(* Content-type: application/vnd.wolfram.mathematica *)

(*** Wolfram Notebook File ***)
(* http://www.wolfram.com/nb *)

(* CreatedBy='Mathematica 12.0' *)

(*CacheID: 234*)
(* Internal cache information:
NotebookFileLineBreakTest
NotebookFileLineBreakTest
NotebookDataPosition[       158,          7]
NotebookDataLength[    169555,       3792]
NotebookOptionsPosition[    156215,       3514]
NotebookOutlinePosition[    156888,       3540]
CellTagsIndexPosition[    156807,       3535]
WindowFrame->Normal*)

(* Beginning of Notebook Content *)
Notebook[{
Cell[TextData[{
 "New in: ",
 Cell["1.7", "HistoryData",
  CellTags->"New",ExpressionUUID->"731ddb66-6e19-4683-97ae-5601c97807d9"],
 " | Modified in: ",
 Cell[" 2.0.0", "HistoryData",
  CellTags->"Modified",ExpressionUUID->"a184e245-a28f-4c78-9549-4776d1e7ebbe"],
 " | Obsolete in: ",
 Cell[" ", "HistoryData",
  CellTags->"Obsolete",ExpressionUUID->"80e1b2ce-11bd-455b-993b-fd45654058f0"],
 " | Excised in: ",
 Cell[" ", "HistoryData",
  CellTags->"Excised",ExpressionUUID->"44e8b340-2296-43ab-9d8b-08f0128f14a9"]
}], "History",
 CellChangeTimes->{{3.782070620091991*^9, 3.7820706207966948`*^9}},
 CellID->1247902091,ExpressionUUID->"a88991d0-0b28-47fc-bb4b-06122308bc09"],

Cell[CellGroupData[{

Cell["Categorization", "CategorizationSection",
 CellID->1122911449,ExpressionUUID->"fd728fc9-f091-4156-99b2-64702a63a044"],

Cell["Symbol", "Categorization",
 CellLabel->"Entity Type",
 CellID->686433507,ExpressionUUID->"abbb9169-930f-4172-a524-a4a0a530705b"],

Cell["MaXrd", "Categorization",
 CellLabel->"Paclet Name",
 CellID->605800465,ExpressionUUID->"8030a66e-e1d7-4022-b2ff-fc48aa3b64db"],

Cell["MaXrd`", "Categorization",
 CellLabel->"Context",
 CellID->468444828,ExpressionUUID->"ceaec733-9e87-4175-bd8b-d074370f8e62"],

Cell["MaXrd/ref/SynthesiseStructure", "Categorization",
 CellLabel->"URI",ExpressionUUID->"86ee919c-855f-4fd9-bcf8-74544f84d9d8"]
}, Closed]],

Cell[CellGroupData[{

Cell["Keywords", "KeywordsSection",
 CellID->477174294,ExpressionUUID->"a1fb591c-35a4-426e-a532-0e84497c33b1"],

Cell["XXXX", "Keywords",
 CellID->1164421360,ExpressionUUID->"0f3151f2-a392-4f64-b88e-ae95e51cb742"]
}, Closed]],

Cell[CellGroupData[{

Cell["Syntax Templates", "TemplatesSection",
 CellID->1872225408,ExpressionUUID->"7f7203ec-78a1-4c52-84d5-8bd22719486d"],

Cell[BoxData[""], "Template",
 CellLabel->"Additional Function Template",
 CellID->1562036412,ExpressionUUID->"ac2aea92-30e0-405a-93a6-20b299c18f8c"],

Cell[BoxData[""], "Template",
 CellLabel->"Arguments Pattern",
 CellID->158391909,ExpressionUUID->"a601320d-1b63-4b2a-84cf-d6f98f4186f0"],

Cell[BoxData[""], "Template",
 CellLabel->"Local Variables",
 CellID->1360575930,ExpressionUUID->"34727c7f-0f8a-4ca3-a38f-7cecad1edefa"],

Cell[BoxData[""], "Template",
 CellLabel->"Color Equal Signs",
 CellID->793782254,ExpressionUUID->"23b474d1-d0a5-4480-b0e3-85b8d88c25a7"]
}, Closed]],

Cell[CellGroupData[{

Cell["Details", "DetailsSection",
 CellID->307771771,ExpressionUUID->"968b81dd-427f-491e-a037-ace9c30c3e7c"],

Cell["XXXX", "Details",
 CellLabel->"Lead",
 CellID->670882175,ExpressionUUID->"516b0fb7-3913-4ec5-821e-e1768959b4f8"],

Cell["XXXX", "Details",
 CellLabel->"Developers",
 CellID->350963985,ExpressionUUID->"008bbf00-9d2f-46d6-b2a6-be2e64de1f2a"],

Cell["XXXX", "Details",
 CellLabel->"Authors",
 CellID->8391405,ExpressionUUID->"be3881dc-9e57-4362-8337-8ab9f982055f"],

Cell["XXXX", "Details",
 CellLabel->"Feature Name",
 CellID->3610269,ExpressionUUID->"0b21da73-07f7-463d-9ae1-500fac6680cb"],

Cell["XXXX", "Details",
 CellLabel->"QA",
 CellID->401364205,ExpressionUUID->"d787bb51-f935-4f00-aeb7-d85073288522"],

Cell["XXXX", "Details",
 CellLabel->"DA",
 CellID->350204745,ExpressionUUID->"85e09dd5-bbc2-4b3d-b3d3-be1198ccd303"],

Cell["XXXX", "Details",
 CellLabel->"Docs",
 CellID->732958810,ExpressionUUID->"3adb3215-e910-4794-b804-705882790156"],

Cell["XXXX", "Details",
 CellLabel->"Features Page Notes",
 CellID->222905350,ExpressionUUID->"88da69ff-5bc2-4de7-b645-8da5e33b4d19"],

Cell["XXXX", "Details",
 CellLabel->"Comments",
 CellID->240026365,ExpressionUUID->"ce2d322b-a94f-4666-bd20-0ecad432d593"]
}, Closed]],

Cell[CellGroupData[{

Cell["SynthesiseStructure", "ObjectName",
 CellID->1224892054,ExpressionUUID->"62e86a78-9d73-4bb8-be68-117cf45aacc8"],

Cell[TextData[{
 Cell["   ", "ModInfo",ExpressionUUID->"7d6f5267-23f6-4013-b599-418e726cf50c"],
 Cell[BoxData[
  RowBox[{
   ButtonBox["SynthesiseStructure",
    BaseStyle->"Link",
    ButtonData->"paclet:MaXrd/ref/SynthesiseStructure"], "[", 
   RowBox[{
    StyleBox["blocks", "TI"], ",", 
    RowBox[{"{", 
     RowBox[{
      StyleBox["A", "TI"], ",", 
      StyleBox["B", "TI"], ",", 
      StyleBox["C", "TI"]}], "}"}], ",", 
    StyleBox["label", "TI"]}], "]"}]], "InlineFormula",ExpressionUUID->
  "95e60331-1a02-461d-bc53-445e864e0731"],
 " \[LineSeparator]assembles ",
 Cell[BoxData[
  StyleBox["blocks", "TI"]], "InlineFormula",ExpressionUUID->
  "5b998680-bf02-46c6-b4b8-8ee575d694a3"],
 " to a structure called ",
 Cell[BoxData[
  StyleBox["label", "TI"]], "InlineFormula",ExpressionUUID->
  "d813a40d-8444-4dc5-b8d1-26a9eb7ac0e0"],
 " with size ",
 Cell[BoxData[
  RowBox[{
   StyleBox["A", "TI"], "\[Times]", 
   StyleBox["B", "TI"], "\[Times]", 
   StyleBox["C", "TI"]}]], "InlineFormula",ExpressionUUID->
  "6c8e1a3e-861a-4aad-8e58-1a722c68dbf5"],
 ".\n",
 Cell["      ", "ModInfo",ExpressionUUID->
  "6ce12ddc-ca52-434b-8833-7b906ecf0116"],
 Cell[BoxData[
  RowBox[{
   ButtonBox["SynthesiseStructure",
    BaseStyle->"Link",
    ButtonData->"paclet:MaXrd/ref/SynthesiseStructure"], "[", 
   RowBox[{
    StyleBox["domain", "TI"], ",", 
    StyleBox["label", "TI"], ",", 
    StyleBox["map", "TI"]}], "]"}]], "InlineFormula",ExpressionUUID->
  "99e89481-99a3-43f0-a1c1-f5da611e2b0b"],
 "\[LineSeparator]assembles the ",
 Cell[BoxData[
  StyleBox["domain", "TI"]], "InlineFormula",ExpressionUUID->
  "1635a259-6a42-4992-aa7a-7c8debc9caf0"],
 " to a structure called ",
 Cell[BoxData[
  StyleBox["label", "TI"]], "InlineFormula",ExpressionUUID->
  "8a4482cb-9e8c-49d6-b566-c3fa048c4db3"],
 " with ",
 Cell[BoxData[
  StyleBox["map", "TI"]], "InlineFormula",ExpressionUUID->
  "fe17700a-54f8-4cbc-882e-903aebc3da51"],
 " associating the domain identifiers with crystal labels."
}], "Usage",
 CellChangeTimes->{{3.770979001548012*^9, 3.770979011007019*^9}, {
  3.770979043031918*^9, 3.770979096195403*^9}, {3.770979140190776*^9, 
  3.770979284764309*^9}, {3.7820706285401897`*^9, 3.782070675070236*^9}, {
  3.7820707565574913`*^9, 3.782070799927423*^9}, {3.782071838209334*^9, 
  3.7820718555888643`*^9}, {3.784877152075666*^9, 3.784877234809495*^9}, {
  3.784877416852849*^9, 3.7848774177070713`*^9}, {3.784877470474337*^9, 
  3.784877473025687*^9}, {3.784878120320777*^9, 3.784878175750662*^9}},
 CellID->982511436,ExpressionUUID->"d6c4f558-10c1-483b-a0f6-0fa23d6d2f78"],

Cell[TextData[{
 "Input parameter ",
 Cell[BoxData[
  StyleBox["blocks", "TI"]], "InlineFormula",ExpressionUUID->
  "a33dd935-a021-4632-91d0-ffb3ef3ae803"],
 " should be a list of crystals (keys of ",
 Cell[BoxData[
  ButtonBox["$CrystalData",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/$CrystalData"]], "InlineFormula",
  ExpressionUUID->"d8d24cf8-98cb-47fd-a0dd-e633ac6f4003"],
 ")."
}], "Notes",
 CellChangeTimes->{{3.770979287060088*^9, 3.770979356523246*^9}},
 CellID->1067943069,ExpressionUUID->"14854678-92b4-4d21-9a15-a699cffc4083"],

Cell[TextData[{
 Cell[BoxData[
  StyleBox["domain", "TI"]], "InlineFormula",ExpressionUUID->
  "47fee321-c7a7-4529-8de2-9914afca88b7"],
 " should be on the same form as produced by ",
 Cell[BoxData[
  ButtonBox["ConstructDomains",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/ConstructDomains"]], "InlineFormula",
  ExpressionUUID->"6ebc4479-ac88-450b-83b7-039872df09da"],
 ". The ",
 Cell[BoxData[
  StyleBox["map", "TI"]], "InlineFormula",ExpressionUUID->
  "a8ef9f31-9e4c-4977-b9cb-c416eaa7eeda"],
 " parameter can be omitted if the ",
 Cell[BoxData[
  StyleBox["domain", "TI"]], "InlineFormula",ExpressionUUID->
  "87a0ce5d-52c0-4803-802d-7b3f312f8359"],
 " already contains crystal labels. Different domains can map to the same \
crystal while differentiating any rotations."
}], "Notes",
 CellChangeTimes->{{3.782070686547517*^9, 3.782070729342098*^9}, {
   3.782072026299843*^9, 3.782072045302841*^9}, {3.782072087593133*^9, 
   3.7820720895446243`*^9}, {3.7820721367951736`*^9, 3.782072158111112*^9}, {
   3.782072450099329*^9, 3.78207251695154*^9}, {3.782072552871231*^9, 
   3.782072664873465*^9}, {3.782072701903545*^9, 3.7820727269787273`*^9}, {
   3.782073720991886*^9, 3.782073780984338*^9}, 3.784878168514475*^9, {
   3.784878289567836*^9, 3.784878304564085*^9}, {3.784878795995846*^9, 
   3.784878884768036*^9}},
 CellID->422530408,ExpressionUUID->"5d86b751-ff68-4742-827a-49a78df5ad53"],

Cell[TextData[{
 "In addition to the options dealing with overlapping atoms from ",
 Cell[BoxData[
  ButtonBox["EmbedStructure",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/EmbedStructure"]], "InlineFormula",
  ExpressionUUID->"63df1f85-b680-4f3d-8a62-3ec4e6be276e"],
 ", there are:"
}], "Notes",
 CellChangeTimes->{{3.77123656514815*^9, 3.771236600613772*^9}},
 CellID->1485514993,ExpressionUUID->"ace29f84-37ba-42f5-be15-e5124b5c4eae"],

Cell[BoxData[GridBox[{
   {Cell["      ", "ModInfo",ExpressionUUID->
     "058392d3-13c3-4365-9d3e-4d2f05b190c5"], "\"\<OverlapPrecedence\>\"", 
    "\"\<\>\"", Cell[TextData[Cell[TextData[{
     "choose either ",
     StyleBox["\"Host\"", "InlineCode"],
     " or ",
     StyleBox["\"Guest\"", "InlineCode"],
     " to prevail in case of overlap"
    }], "TableText",ExpressionUUID->"3bf9789d-dcd4-4d4f-a573-d5957dd94287"]], 
     "TableText",ExpressionUUID->"b74c5288-0f2e-4ff5-bd6e-f767b56beffd"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "fe71df98-b10e-4091-8518-9f4e10eacc14"], "\"\<OverlapRadius\>\"", "1.", 
    Cell[TextData[Cell[
    "threshold for registering overlap of atoms", "TableText",ExpressionUUID->
     "59ad57d8-dbd4-44fe-bdde-213e73986fb7"]], "TableText",ExpressionUUID->
     "7bff4232-4a7c-4c67-ac85-b6d3253dc565"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "9c12e8c9-7cc7-46be-8b49-c951dcac245c"], "\"\<SelectionMethod\>\"", 
    "\"\<Sequential\>\"", Cell[TextData[Cell[
    "method for choosing items from the input blocks", "TableText",
     ExpressionUUID->"0cb02089-f87c-4cd8-a2bc-66e0d2339132"]], "TableText",
     ExpressionUUID->"46afb451-2188-48fb-b623-79d394f2a294"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "78bed77c-603c-4843-a6c3-6abae8fecd93"], "\"\<UsePlacementBuffer\>\"", 
    ButtonBox["False",
     BaseStyle->"Link"], Cell[TextData[Cell[
    "whether to use a buffer equal to the block size", "TableText",
     ExpressionUUID->"a3976847-17f8-4609-8f34-e36a3a1fd74a"]], "TableText",
     ExpressionUUID->"76cb082a-e1c8-4cfd-b163-316703254c68"]}
  }]], "3ColumnTableMod",
 TaggingRules->{"Alphabetized" -> True},
 CellChangeTimes->{{3.7848796398517303`*^9, 3.784879748647242*^9}},
 CellID->1407269227,ExpressionUUID->"70503679-2dfc-4245-aaa1-d1dac5b34738"],

Cell[TextData[{
 "Rotation options (see also the tutorial ",
 StyleBox[ButtonBox["Using the rotation options",
  BaseStyle->"Link",
  ButtonData->"paclet:MaXrd/tutorial/UsingRotationMaps"],
  FontSlant->"Italic"],
 "):"
}], "Notes",
 CellChangeTimes->{{3.784879750250545*^9, 3.7848797525882072`*^9}, {
  3.784879812330681*^9, 3.7848799733642893`*^9}},
 CellID->956015342,ExpressionUUID->"e6700edd-247d-4e54-928c-2736b0057e1d"],

Cell[BoxData[GridBox[{
   {Cell["      ", "ModInfo",ExpressionUUID->
     "f9ef6102-9d3d-4178-8ba6-7f69c1315129"], 
    "\"\<RotationAnchorReference\>\"", "\"\<DomainCentroid\>\"", Cell[
    TextData[Cell[
    "which point to perform rotation about", "TableText",ExpressionUUID->
     "7ddc90df-bd4d-4487-ace6-90aa9be0a3f5"]], "TableText",ExpressionUUID->
     "f5110cc9-4460-4801-9352-1f8a32e253d3"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "79f3731c-080c-464e-8a35-1ea46ed6f0ba"], "\"\<RotationAnchorShift\>\"", 
    RowBox[{"{", 
     RowBox[{"0", ",", " ", "0", ",", " ", "0"}], "}"}], Cell[TextData[Cell[
    "translation of the anchor point", "TableText",ExpressionUUID->
     "7fd3b1ac-6048-4f28-8de1-4237088c7d43"]], "TableText",ExpressionUUID->
     "99b7ed75-650d-4d42-bf53-ee89993c7a76"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "553493ea-7b04-43ec-96e0-d1366b7d4eb7"], "\"\<RotationAxes\>\"", 
    RowBox[{
     ButtonBox["IdentityMatrix",
      BaseStyle->"Link",
      ButtonData->"paclet:ref/IdentityMatrix"], "[", "3", "]"}], Cell[
    TextData[Cell[
    "three vectors defining the rotation axes", "TableText",ExpressionUUID->
     "119b6f4b-b01e-46ed-8fe0-effff858ca5d"]], "TableText",ExpressionUUID->
     "b538cae1-7dfb-4438-acea-5034109fcc7a"]},
   {Cell["      ", "ModInfo",ExpressionUUID->
     "ca513998-e86d-449e-98ee-2601d833d983"], "\"\<RotationMap\>\"", 
    RowBox[{"<|", "|>"}], Cell[TextData[Cell[
    "execute rotations of domains", "TableText",ExpressionUUID->
     "15f40ea2-c369-49ac-bace-7ae277a93786"]], "TableText",ExpressionUUID->
     "0ff6b2dd-b0f7-474f-adbc-9f7811d5a662"]}
  }]], "3ColumnTableMod",
 TaggingRules->{"Alphabetized" -> True},
 CellChangeTimes->{{3.7848796398517303`*^9, 3.784879783685626*^9}, 
   3.784879999858491*^9, {3.784880100290435*^9, 3.784880105137301*^9}},
 CellID->1399050214,ExpressionUUID->"9cb39cbb-900d-41e3-b28c-c48dfcd1f821"],

Cell[TextData[{
 "The crystal items in ",
 Cell[BoxData[
  StyleBox["blocks", "TI"]], "InlineFormula",ExpressionUUID->
  "bb855577-c57f-4ed4-875e-1d35967c76cc"],
 " are duplicated until there are at least ",
 Cell[BoxData[
  FormBox[
   RowBox[{"A", "\[Times]", "B", "\[Times]", "C"}], TraditionalForm]], 
  "InlineMath",ExpressionUUID->"f5a534da-a479-4eee-854f-0d2956f04a83"],
 " units. Using the default setting of ",
 Cell[BoxData[
 "\"\<SelectionMethod\>\""], "InlineFormula",ExpressionUUID->
  "b192a447-9484-4508-a2d6-87fbcd3e39f3"],
 ", ",
 Cell[BoxData[
 "\"\<Sequential\>\""], "InlineFormula",ExpressionUUID->
  "c9ae9bb5-0772-4161-a0d9-1bc621177241"],
 ", the items will simply be placed in order. Use ",
 Cell[BoxData[
 "\"\<Random\>\""], "InlineFormula",ExpressionUUID->
  "115b7e4a-798f-486e-9ad9-56cec9f45c2e"],
 " to randomise the order before insertion."
}], "Notes",
 CellChangeTimes->{{3.771236929288541*^9, 3.771237140966563*^9}, {
   3.771237362316527*^9, 3.7712373635352697`*^9}, 3.7712374894898148`*^9},
 CellID->742680128,ExpressionUUID->"a6828fb1-bd39-42d8-acfc-933d486550da"],

Cell[TextData[{
 "If ",
 Cell[BoxData[
  RowBox[{"\"\<UsePlacementBuffer\>\"", "\[Rule]", "True"}]], "InlineFormula",
  ExpressionUUID->"53adc02e-cb0d-4790-9a59-0d038ea9871e"],
 ", the ",
 Cell[BoxData[
  StyleBox["blocks", "TI"]], "InlineFormula",ExpressionUUID->
  "f0d6bb9d-eb31-43c4-a308-5a3cd5099835"],
 " are not placed \
\[OpenCurlyDoubleQuote]edge-to-edge\[CloseCurlyDoubleQuote], but with a void \
between them equal to the size of each block. The specified size in the \
second argument still represents the number of blocks along the three \
dimensions."
}], "Notes",
 CellChangeTimes->{{3.771236929288541*^9, 3.771236977474493*^9}, {
  3.7712373864093113`*^9, 3.771237529208404*^9}, {3.771237684428475*^9, 
  3.771237695263405*^9}, {3.771237734958852*^9, 3.771237850869232*^9}},
 CellID->747782077,ExpressionUUID->"40090990-8d26-4f16-8f97-e3192b95eb29"],

Cell[TextData[{
 "If ",
 Cell[BoxData[
 "\"\<OverlapPrecedence\>\""], "InlineFormula",ExpressionUUID->
  "9964b7eb-d272-4eb1-9501-e91b6e488b79"],
 " is set to ",
 Cell[BoxData[
 "\"\<Host\>\""], "InlineFormula",ExpressionUUID->
  "8134bd0e-07f0-490e-b49d-ab17af845a89"],
 " the blocks placed first will effectively be kept if another block has \
overlapping atoms. If set to ",
 Cell[BoxData[
 "\"\<Guest\>\""], "InlineFormula",ExpressionUUID->
  "ed33ba62-cc63-4fcf-86b4-de5550c27f3a"],
 ", the most recently placed blocks will be kept. By default no measure is \
taken for detecting or removing overlapping atoms."
}], "Notes",
 CellChangeTimes->{{3.7712389451795893`*^9, 3.771239147676148*^9}, {
  3.780035492224349*^9, 3.7800355354950953`*^9}},
 CellID->445986520,ExpressionUUID->"ac84a945-d0e5-4fa6-b6cd-89031ec253b8"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Tutorials", "TutorialsSection",
 CellID->250839057,ExpressionUUID->"31060fa4-e9ec-43ca-8896-58b9fe41d034"],

Cell[TextData[ButtonBox["Using the rotation options",
 BaseStyle->"Link",
 ButtonData->"paclet:MaXrd/tutorial/UsingRotationMaps"]], "Tutorials",
 CellChangeTimes->{{3.782113438247541*^9, 3.782113454003908*^9}},
 CellID->360339746,ExpressionUUID->"e39d1d06-0a08-496f-a142-65e9ba4c28b4"],

Cell["XXXX", "Tutorials",
 CellID->341631938,ExpressionUUID->"65290a0c-807e-4335-a22d-04eea17d576b"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Related Demonstrations", "RelatedDemonstrationsSection",
 CellID->1268215905,ExpressionUUID->"65345e67-45ca-4f04-af31-a278dcb07e0f"],

Cell["XXXX", "RelatedDemonstrations",
 CellID->1129518860,ExpressionUUID->"d378d60a-70f5-46f7-9d34-1cbb7d864c7d"]
}, Open  ]],

Cell[CellGroupData[{

Cell["Related Links", "RelatedLinksSection",
 CellID->1584193535,ExpressionUUID->"73a2ee0e-4b84-47a7-9b64-dc9e47b60037"],

Cell["XXXX", "RelatedLinks",
 CellID->1038487239,ExpressionUUID->"6954a36d-3b79-4457-a616-2958f20de2cf"]
}, Open  ]],

Cell[CellGroupData[{

Cell["See Also", "SeeAlsoSection",
 CellID->1255426704,ExpressionUUID->"43e7ec72-3601-484a-bca8-b850ee209157"],

Cell[TextData[{
 Cell[BoxData[
  ButtonBox["ExpandCrystal",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/ExpandCrystal"]], "InlineFormula",
  ExpressionUUID->"7b37add1-3c9e-4356-8436-fce93db44910"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["EmbedStructure",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/EmbedStructure"]], "InlineFormula",
  ExpressionUUID->"9568c251-dcba-41b7-8f48-af5c555d3fda"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["ConstructDomains",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/ConstructDomains"]], "InlineFormula",
  ExpressionUUID->"88a924f8-10e8-49d6-a995-20f29e6e7e1f"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["DistortStructure",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/DistortStructure"]], "InlineFormula",
  ExpressionUUID->"5d72991b-2054-47c4-917b-96ca34b735e2"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["CrystalPlot",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/CrystalPlot"]], "InlineFormula",
  ExpressionUUID->"5a989c85-aef9-41bd-a3a5-f6026f0fdfaf"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["SimulateDiffractionPattern",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/SimulateDiffractionPattern"]], 
  "InlineFormula",ExpressionUUID->"be84b038-092f-4ca0-83d0-6487a20259ec"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["DomainPlot",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/DomainPlot"]], "InlineFormula",
  ExpressionUUID->"1f6eb01d-061c-4393-a71f-dcf953151814"],
 " \[EmptyVerySmallSquare] ",
 Cell[BoxData[
  ButtonBox["$CrystalData",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/$CrystalData"]], "InlineFormula",
  ExpressionUUID->"eccfd2bf-a9f7-4afa-b242-e2fcd605377b"]
}], "SeeAlso",
 CellChangeTimes->{{3.771238142634942*^9, 3.771238157772504*^9}, {
  3.771238210378108*^9, 3.771238226266724*^9}, {3.779700758502322*^9, 
  3.779700761427998*^9}, {3.782074784387484*^9, 3.782074789993932*^9}, {
  3.785058061874426*^9, 3.785058061874578*^9}},
 CellID->929782353,ExpressionUUID->"c6eb2bad-3411-4f34-bc60-dd081d2dc70c"]
}, Open  ]],

Cell[CellGroupData[{

Cell["More About", "MoreAboutSection",
 CellID->38303248,ExpressionUUID->"1fbc7a9a-33aa-4e24-8d40-d94255cc498f"],

Cell["XXXX", "MoreAbout",
 CellID->1665078683,ExpressionUUID->"97afaf04-4753-4505-afd0-de289206f8d4"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[GridBox[{
    {
     StyleBox["Examples", "PrimaryExamplesSection"], 
     ButtonBox[
      RowBox[{
       RowBox[{"More", " ", "Examples"}], " ", "\[RightTriangle]"}],
      BaseStyle->"ExtendedExamplesLink",
      ButtonData:>"ExtendedExamples"]}
   }],
  $Line = 0; Null]], "PrimaryExamplesSection",
 CellID->880084151,ExpressionUUID->"77b53bab-e8c2-4ebc-a274-a496697b3ed1"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"ExpandCrystal", "[", 
   RowBox[{"\"\<Quartz\>\"", ",", 
    RowBox[{"{", 
     RowBox[{"1", ",", "1", ",", "1"}], "}"}], ",", 
    RowBox[{"\"\<NewLabel\>\"", "\[Rule]", "\"\<BlockA\>\""}]}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"AppendTo", "[", 
   RowBox[{"$CrystalData", ",", 
    RowBox[{
     RowBox[{"\"\<BlockB\>\"", "\[Rule]", 
      RowBox[{"$CrystalData", "[", "\"\<BlockA\>\"", "]"}]}], "/.", 
     RowBox[{"\"\<Si\>\"", "\[Rule]", "\"\<P\>\""}]}]}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"AppendTo", "[", 
   RowBox[{"$CrystalData", ",", 
    RowBox[{
     RowBox[{"\"\<BlockC\>\"", "\[Rule]", 
      RowBox[{"$CrystalData", "[", "\"\<BlockA\>\"", "]"}]}], "/.", 
     RowBox[{"\"\<Si\>\"", "\[Rule]", "\"\<B\>\""}]}]}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"CrystalPlot", "@", 
  RowBox[{"SynthesiseStructure", "[", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"\"\<BlockA\>\"", ",", "\"\<BlockB\>\"", ",", "\"\<BlockC\>\""}],
      "}"}], ",", 
    RowBox[{"{", 
     RowBox[{"4", ",", "4", ",", "1"}], "}"}], ",", "\"\<Demo\>\""}], 
   "]"}]}]}], "Input",
 CellChangeTimes->{{3.771234269914906*^9, 3.771234282215734*^9}, {
  3.77123431395977*^9, 3.771234356325293*^9}, {3.771234391909552*^9, 
  3.771234397247838*^9}, {3.77123443340705*^9, 3.771234455090871*^9}, {
  3.771234487636045*^9, 3.771234543652144*^9}, {3.771234596752351*^9, 
  3.7712345973375893`*^9}},
 CellLabel->"In[1]:=",
 CellID->1676600577,ExpressionUUID->"ae193080-f3f7-44d2-849c-796e4ab8f293"],

Cell[BoxData[
 Graphics3DBox[{
   {RGBColor[1, 0, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {4.914, 0., 0.}}]]}, 
   {RGBColor[0, 1, 0], 
    Arrow3DBox[Line3DBox[{{0, 0, 0}, {-2.457, 4.255648834196731, 0.}}]]}, 
   {RGBColor[0, 0, 1], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 0., 5.406}}]]}, 
   {GrayLevel[0], 
    Line3DBox[{{-2.457, 4.255648834196731, 0.}, {2.457, 4.255648834196731, 
     0.}}]}, 
   {GrayLevel[0], 
    Line3DBox[{{4.914, 0., 0.}, {2.457, 4.255648834196731, 0.}}]}, 
   {GrayLevel[0], Line3DBox[{{4.914, 0., 0.}, {4.914, 0., 5.406}}]}, 
   {GrayLevel[0], 
    Line3DBox[{{-2.457, 4.255648834196731, 0.}, {-2.457, 4.255648834196731, 
     5.406}}]}, 
   {GrayLevel[0], 
    Line3DBox[{{2.457, 4.255648834196731, 0.}, {2.457, 4.255648834196731, 
     5.406}}]}, 
   {GrayLevel[0], Line3DBox[{{0., 0., 5.406}, {4.914, 0., 5.406}}]}, 
   {GrayLevel[0], 
    Line3DBox[{{0., 0., 5.406}, {-2.457, 4.255648834196731, 5.406}}]}, 
   {GrayLevel[0], 
    Line3DBox[{{-2.457, 4.255648834196731, 5.406}, {2.457, 4.255648834196731, 
     5.406}}]}, 
   {GrayLevel[0], 
    Line3DBox[{{4.914, 0., 5.406}, {2.457, 4.255648834196731, 5.406}}]}, 
   {RGBColor[0.941176, 0.784314, 0.627451], SphereBox[CompressedData["
1:eJxTTMoPSmViYGBQAWJmIObqWFLIXMnkwAAFicf+8v+58sceIv5p/wrrt7ZP
/v23d2qd9PTfFR4HoUv7T96+9sV+WfmuOnkehD50ccstJ8r2zRd1cAi4deDQ
u0P793bdOHeCVdABZr642KSmWGE+B3TzJ/zfsTnVXuSAzAUXs7UdmnD1Z4yq
VER4FQ9MLGfa19mh6wBTL+gvXWXgJnGANe+z6FZuPbh70MVh7oHYK3cA4h5D
uPkihS1hhU94MMyHhQ9EvSJcPQc0fIyMpoUtZVWFqxeAhYNG+7oLHapw96CL
o4cPun8loOGDbv6Zw+smmcQoO6CH5yRFpQnL7ko4LL8ZfK+RVRKunndOrf75
CEWHCcdM+25wS8Hdgy4Oc48QOBxkMPwboP5K7LSTGob5kHgxxEg/UzaF/Tum
o+2wHC1+38x7WJTIbeCAnn7QxWHuCbnVnqhjoIvh394n09PiG4wwzD8HDR/0
8ISFD3r8wsIBPf2gi8PcI4ISPoYY4YNuPgDQ8X8o
     "], 1.11]}, 
   {RGBColor[0.800498, 0.201504, 0.192061], SphereBox[CompressedData["
1:eJxl1VtIk2EYB3Dt03I6c2oH89DU5pxb6uyAZNT3RkaeCh1iGlIhqWVU0gFc
puVQSpA8VCCJuZxK6UWQRolWH0XGnFpkIRQS5TK1LtKadFiYF8/zXTzfxXv3
h+d/8fvzhuWdNOQvcXFxObT4uMXnUE40Pfjr4HsyPNvN2jlew1YMNZrmeKdC
OBX1Q8Yqj0TkjE9N8Imc7MRg1zK2afJwo3XpUlbe8OmnzMmxLsNIe4SXP9NY
r799Of+an3dvzvBROvmYtmc7AxYUTJ1Q0RKZOfuk5Zsudce8B4vOv3zh3lWO
9dTGZ35ZP83n9BXu3u/rzYrlo5cG2uw85rXKoF/FdSsZ9umH/HD8P6Pd5M+w
jx7u/h1Ntg5zQWKfqdMLrSuTXYWEId5S4x3AsE/44KnjnEEuyCtOnJm+GCL2
SWxIqj/W++dJ0ZGaubNXlGIfzP94Y5wITl0n9tkO+V0fi9qyEsPFPng3N9Y3
zeamFvucf5VtNpX4CaU6eW9ntUrs01jaUPXbuVr4XGUJy9kZKfYJ2KrrNpgU
wjXjvUPKFI3YB/OGwMkU1xGd2GcV5C3qMa+tL7Rin1K423emrPvupRixD/cl
7uS5tGDhXXFJaK08WuyjsG7uLJkKFRJtPtXbBmLFPi0ZbqaUrEDBeNDHXlGg
F/t4OTorx9VrWDfxMxBYrXuaHirxozbbj2Z2rWVlxI+52qspd2wFcxA/Ho8s
x2zty9lN4odTbrlcM7yKUT8yyFM/7pCnfvAu9bMRnFM/P2Ev1M8v2Av1g3nq
B/dF/WyAu9RPKDinfjSwF+rnNuyF+sE89fMQ8tQP3qV+ZsA59aOCvVA/SbAX
6se7Pqa+oFAt8bMnLu9Pr0or8XOjwMa1RkVJ/GS/PxDcwaskfqzuT+8UlYVJ
/Hh0OPweJ0RI/GCe+vGEPPWzD+5SPxpwTv3gXqif57AX6gfz1A/ui/qJhLvU
zy1wTv3gvqgf3Bf1g3nqB/dF/eC+qB/8R6if77AX6gf3Rf0MjnL6uyF6iZ8Z
S7M92xkn8VO33TA9VB4n8fNhNv5rs3+MxE96cFNJXoZO4qeuf+Tj/eWxEj+Y
p34aIE/9jMNd6qcJnFM/ctgL9ZMGe6F+ME/97IU89YP7on5wX9QP7oX6wX1R
P5infnBf1E8W3KV+cF/UjyfshfrBfVE//wGAEtVk
     "], 0.48]}, 
   {RGBColor[1., 0.501961, 0], SphereBox[CompressedData["
1:eJxTTMoPSmViYGCQA2JmIHYIuHXg0LtD+/d23Th3glXQIfHYX/4/V/7YCxe2
hBU+4Tmw/GbwvUZWSQen1klP/13hceDqWFLIXPlp/4Rjpn03uKUcGKAAXdxy
y4myffNFHYQu7T95+xrLAYj5inDzIeJf7NHNh9grAzcXpl5CbFJTrDCfw3Lr
t7ZP/v23h6mfpKg0YdldCYdl5bvq5HmY4PrQxWHu6Yla3V4pIOyA7l/eObX6
5yMUMcyHhY/MBReztR2acPUi0PCZWM60r7NDF+5+Hmg4sOZ9Ft3KrQd3D7o4
9vAxhJsvAA0fdPOFoOGDHp6w8DEymha2lFUVrn4yLBw02tdd6FCFuwddHOae
bmj4oPsXFj7o5ofcak/UMdDFCM8A9Vdip53UHNDjd8qmsH/HdLQd0NMPujjM
PYL+0lUGbhoY/n0z72FRIrcBhvkArL9G0g==
     "], 0.98]}, 
   {RGBColor[1., 0.709804, 0.709804], SphereBox[CompressedData["
1:eJxTTMoPSmViYGCQA2JmIBa6tP/k7WssB/Z23Th3glXRIfHYX/4/V/7YC/hL
Vxm4SRwwMpoWtpRV1cGpddLTf1d4HEQKW8IKn/AcWKbRvu5Ch6oDAxSgi1tu
OVG2b76ow4T/Ozan2osckLngYra2QxNuPkfHkkLmyk/70c3viVrdXikg7ABx
jyBcPcSdX+yX3wy+18gqCVcvLjapKVaYz2HCMdO+G9xScPegi8PcwwW2l8kB
3b+TFJUmLLsr4YBuPiQcNODmwtTzzqnVPx+h6LDc+q3tk3//7WHqA9VfiZ12
UnNYVr6rTp6HCa4PXRzmnjOH100yiVHG8O+UTWH/juloY5jfDQ0f9PAUgIbP
xHKmfZ0dunD3S0DDgTXvs+hWbj24e9DFYe7hQAkfQ4zwQTdfEBo+6OEJCx/0
+A2AhQNa+kEXh7nnHDR80P0LCx908wGbdjeA
     "], 0.87]}},
  AlignmentPoint->Center,
  AspectRatio->Automatic,
  Axes->False,
  AxesEdge->Automatic,
  AxesLabel->None,
  AxesOrigin->Automatic,
  AxesStyle->{},
  Background->None,
  BaseStyle->{},
  BaselinePosition->Automatic,
  BoxRatios->Automatic,
  BoxStyle->{},
  Boxed->False,
  ClipPlanes->None,
  ClipPlanesStyle->Automatic,
  ColorOutput->Automatic,
  ContentSelectable->Automatic,
  ControllerLinking->Automatic,
  ControllerMethod->Automatic,
  ControllerPath->Automatic,
  CoordinatesToolOptions:>Automatic,
  DisplayFunction->Identity,
  Epilog->{},
  FaceGrids->None,
  FaceGridsStyle->{},
  FormatType->TraditionalForm,
  ImageMargins->0.,
  ImagePadding->All,
  ImageSize->Automatic,
  ImageSizeRaw->Automatic,
  LabelStyle->{},
  Lighting->"Neutral",
  Method->Automatic,
  PlotLabel->None,
  PlotRange->All,
  PlotRangePadding->Automatic,
  PlotRegion->Automatic,
  PreserveImageOptions->Automatic,
  Prolog->{},
  RotationAction->"Fit",
  SphericalRegion->True,
  Ticks->Automatic,
  TicksStyle->{},
  TouchscreenAutoZoom->False,
  ViewAngle->Automatic,
  ViewCenter->Automatic,
  ViewMatrix->Automatic,
  ViewPoint->Above,
  ViewProjection->Automatic,
  ViewRange->All,
  ViewVector->Automatic,
  ViewVertical->{0, 0, 1}]], "Output",
 CellChangeTimes->{{3.7712346158893833`*^9, 3.7712346215569773`*^9}, 
   3.78207289104263*^9},
 CellLabel->"Out[4]=",
 CellID->1198449896,ExpressionUUID->"0523326d-7c9d-45e4-afe0-ddf06ebf0d07"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", 
   RowBox[{"ConstructDomains", "[", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"5", ",", "5", ",", "1"}], "}"}], ",", "3", ",", "15"}], 
    "]"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"DomainPlot", "@", "domain"}]}], "Input",
 CellChangeTimes->{{3.782072758813738*^9, 3.782072814680681*^9}},
 CellLabel->"In[5]:=",
 CellID->91496923,ExpressionUUID->"ae571093-483a-4060-9d15-115d370cae54"],

Cell[BoxData[
 GraphicsBox[
  {Opacity[1.], 
   {RGBColor[0, 1, 0], 
    InterpretationBox[PolygonBox[{{0., 0.}, {1., 0.}, {1., 1.}, {0., 1.}}],
     Parallelepiped[{0., 0.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 1, 0], 
    InterpretationBox[PolygonBox[{{0., 1.}, {1., 1.}, {1., 2.}, {0., 2.}}],
     Parallelepiped[{0., 1.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 1, 0], 
    InterpretationBox[PolygonBox[{{0., 2.}, {1., 2.}, {1., 3.}, {0., 3.}}],
     Parallelepiped[{0., 2.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 1, 0], 
    InterpretationBox[PolygonBox[{{0., 3.}, {1., 3.}, {1., 4.}, {0., 4.}}],
     Parallelepiped[{0., 3.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 1, 0], 
    InterpretationBox[PolygonBox[{{0., 4.}, {1., 4.}, {1., 5.}, {0., 5.}}],
     Parallelepiped[{0., 4.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 1, 0], 
    InterpretationBox[PolygonBox[{{1., 0.}, {2., 0.}, {2., 1.}, {1., 1.}}],
     Parallelepiped[{1., 0.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 1, 0], 
    InterpretationBox[PolygonBox[{{1., 1.}, {2., 1.}, {2., 2.}, {1., 2.}}],
     Parallelepiped[{1., 1.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 1, 0], 
    InterpretationBox[PolygonBox[{{1., 2.}, {2., 2.}, {2., 3.}, {1., 3.}}],
     Parallelepiped[{1., 2.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 1, 0], 
    InterpretationBox[PolygonBox[{{1., 3.}, {2., 3.}, {2., 4.}, {1., 4.}}],
     Parallelepiped[{1., 3.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 1, 0], 
    InterpretationBox[PolygonBox[{{1., 4.}, {2., 4.}, {2., 5.}, {1., 5.}}],
     Parallelepiped[{1., 4.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 1, 0], 
    InterpretationBox[PolygonBox[{{2., 0.}, {3., 0.}, {3., 1.}, {2., 1.}}],
     Parallelepiped[{2., 0.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 0, 1], 
    InterpretationBox[PolygonBox[{{2., 1.}, {3., 1.}, {3., 2.}, {2., 2.}}],
     Parallelepiped[{2., 1.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 0, 1], 
    InterpretationBox[PolygonBox[{{2., 2.}, {3., 2.}, {3., 3.}, {2., 3.}}],
     Parallelepiped[{2., 2.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 1, 0], 
    InterpretationBox[PolygonBox[{{2., 3.}, {3., 3.}, {3., 4.}, {2., 4.}}],
     Parallelepiped[{2., 3.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[1, 0, 0], 
    InterpretationBox[PolygonBox[{{2., 4.}, {3., 4.}, {3., 5.}, {2., 5.}}],
     Parallelepiped[{2., 4.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 0, 1], 
    InterpretationBox[PolygonBox[{{3., 0.}, {4., 0.}, {4., 1.}, {3., 1.}}],
     Parallelepiped[{3., 0.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 0, 1], 
    InterpretationBox[PolygonBox[{{3., 1.}, {4., 1.}, {4., 2.}, {3., 2.}}],
     Parallelepiped[{3., 1.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 0, 1], 
    InterpretationBox[PolygonBox[{{3., 2.}, {4., 2.}, {4., 3.}, {3., 3.}}],
     Parallelepiped[{3., 2.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 0, 1], 
    InterpretationBox[PolygonBox[{{3., 3.}, {4., 3.}, {4., 4.}, {3., 4.}}],
     Parallelepiped[{3., 3.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[1, 0, 0], 
    InterpretationBox[PolygonBox[{{3., 4.}, {4., 4.}, {4., 5.}, {3., 5.}}],
     Parallelepiped[{3., 4.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 0, 1], 
    InterpretationBox[PolygonBox[{{4., 0.}, {5., 0.}, {5., 1.}, {4., 1.}}],
     Parallelepiped[{4., 0.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 0, 1], 
    InterpretationBox[PolygonBox[{{4., 1.}, {5., 1.}, {5., 2.}, {4., 2.}}],
     Parallelepiped[{4., 1.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[0, 0, 1], 
    InterpretationBox[PolygonBox[{{4., 2.}, {5., 2.}, {5., 3.}, {4., 3.}}],
     Parallelepiped[{4., 2.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[1, 0, 0], 
    InterpretationBox[PolygonBox[{{4., 3.}, {5., 3.}, {5., 4.}, {4., 4.}}],
     Parallelepiped[{4., 3.}, {{1., 0.}, {0., 1.}}]]}, 
   {RGBColor[1, 0, 0], 
    InterpretationBox[PolygonBox[{{4., 4.}, {5., 4.}, {5., 5.}, {4., 5.}}],
     Parallelepiped[{4., 4.}, {{1., 0.}, {0., 1.}}]]}},
  Frame->False]], "Output",
 CellChangeTimes->{{3.782072810226511*^9, 3.782072817206271*^9}, {
  3.7820728952355747`*^9, 3.782072900647626*^9}},
 CellLabel->"Out[6]=",
 CellID->1439710254,ExpressionUUID->"90c20289-f9ba-4312-bebe-128ee7436e83"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"SynthesiseStructure", "[", 
   RowBox[{"domain", ",", "\"\<Demo\>\"", ",", "\[IndentingNewLine]", 
    RowBox[{"<|", 
     RowBox[{
      RowBox[{"1", "\[Rule]", "\"\<BlockA\>\""}], ",", 
      RowBox[{"2", "\[Rule]", "\"\<BlockB\>\""}], ",", 
      RowBox[{"3", "\[Rule]", "\"\<BlockC\>\""}]}], "|>"}]}], "]"}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{"CrystalPlot", "[", "\"\<Demo\>\"", "]"}]}], "Input",
 CellChangeTimes->{{3.7820728221270533`*^9, 3.782072922262273*^9}},
 CellLabel->"In[7]:=",
 CellID->678446058,ExpressionUUID->"47a012cf-5c12-4d17-95d4-10e3b5d84c8d"],

Cell[BoxData[
 Graphics3DBox[{
   {RGBColor[1, 0, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {4.914, 0., 0.}}]]}, 
   {RGBColor[0, 1, 0], 
    Arrow3DBox[Line3DBox[{{0, 0, 0}, {-2.457, 4.255648834196731, 0.}}]]}, 
   {RGBColor[0, 0, 1], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 0., 5.406}}]]}, 
   {GrayLevel[0], 
    Line3DBox[{{-2.457, 4.255648834196731, 0.}, {2.457, 4.255648834196731, 
     0.}}]}, 
   {GrayLevel[0], 
    Line3DBox[{{4.914, 0., 0.}, {2.457, 4.255648834196731, 0.}}]}, 
   {GrayLevel[0], Line3DBox[{{4.914, 0., 0.}, {4.914, 0., 5.406}}]}, 
   {GrayLevel[0], 
    Line3DBox[{{-2.457, 4.255648834196731, 0.}, {-2.457, 4.255648834196731, 
     5.406}}]}, 
   {GrayLevel[0], 
    Line3DBox[{{2.457, 4.255648834196731, 0.}, {2.457, 4.255648834196731, 
     5.406}}]}, 
   {GrayLevel[0], Line3DBox[{{0., 0., 5.406}, {4.914, 0., 5.406}}]}, 
   {GrayLevel[0], 
    Line3DBox[{{0., 0., 5.406}, {-2.457, 4.255648834196731, 5.406}}]}, 
   {GrayLevel[0], 
    Line3DBox[{{-2.457, 4.255648834196731, 5.406}, {2.457, 4.255648834196731, 
     5.406}}]}, 
   {GrayLevel[0], 
    Line3DBox[{{4.914, 0., 5.406}, {2.457, 4.255648834196731, 5.406}}]}, 
   {RGBColor[1., 0.501961, 0], SphereBox[CompressedData["
1:eJxTTMoPSmViYGDwAGJmIObqWFLIXMnkwAAFicf+8v+58sceIv5p/wrrt7ZP
/v23d2qd9PTfFR4HoUv7T96+9sV+WfmuOnkehD50ccstJ8r2zRd1cAi4deDQ
u0P793bdOHeCVdABZr642KSmWGE+B3TzcakXLmwJK3zCc2D5zeB7jaySDjD1
MHdOOGbad4NbCu4edHGYeyDuZDkAMV8Rbj7M/ejm41Iv4C9dZeAmccDIaFrY
UlZVuHoRqDuXabSvu9ChCncPujjMPRP+79icai9yQOaCi9naDk24+RxQ96Ob
j0v9GaMqFRFexQMTy5n2dXbowtULQt3JmvdZdCu3Htw96OIw90DiRQ7qX0O4
+TD3o5uPSz3/vmfcAt9VD1TEbRfazmoMVw9z56ab6/f5uBvD3YMuDnNPwLSt
K1Z9Vj6Qs7aPydrdFCP80c2HpBMZjPQsAU1vy9HS2yRFpQnL7ko4oKdndHGY
e3qiVrdXCgg7oKdP3jm1+ucjFDHMx6UeV3qD5Qv09IwuDnMPLP+ip0+Y+7Hn
F0z1uNKbACxfo6VndHH0/I6ePmHhj24+LvW40hsP1J3o6RldHHt+R6RPmPvR
zcepHkd6E4K6Ez09o4vD3DMRmn/R0zMs/NHNh9irgZGecaW3QPVXYqed1DDS
M7o4zD1nDq+bZBKjjJE+p2wK+3dMRxvD/G5oekaPL1zhCYt39PhCF4e5hwMl
fRpipGd08wE3zQVP
     "], 0.98]}, 
   {RGBColor[0.800498, 0.201504, 0.192061], SphereBox[CompressedData["
1:eJxl1WtM1XUcx3H0D8rlcBFEEKHD5XA4cILDTZm4OP8mLUVqniMjKJeNJRIm
EtEGERRnMGVjCXQZixHIxQrWbEKXk6b/6cAOB8iJTaudmkEI5oPkNlKa+eD7
/T34/B+cZ5/t933wep9/VNFx6+H1bm5uHz/+SY9/y9rpjm8fLpuHLd793QkL
ZoO8ebzdtmBeC1Aq4he95IaS2ELX3LQ5W/IqGxvcKKfPvtru2LBBrmv7c8lr
TZIHrZP9sT5BssHx0c8/rVw3r3h0Wvy1a+akviu7Qx8FyPrM+q64vPuXuu4Z
9z294iknHj757rkPJHn4VEbenSfnzYXnjzz74iZfuVwzdWK0b8bM+wTtttXy
lmCZ77lA+4mM/6pnbEEy35NM7z6c2uuYkLaJe+befNQTvHedkjlu7m32DZX5
nuiximOSVaNo6ssq59+LEPdkt+1pPWp/cKm0pHnhrfe14h7eL96ong7fFyPu
yaL9M7dL+/Kzo8U9/O5B06Zcp7te3PPOtYJuW1WgUmPU2AeadOKe9pq2xn/X
QpS/GnujCnfHiXtCdxmHrLYA5cPqc69ocwziHt5bw2Zz1k0axT1baN+rv+mz
62qCuKeG3j1fWTt09kSSuEe6k3L87dxw5dfyqshTmkRxT4Bj+0DVXKSS7fRv
emrUJO7psrjbcvLDlOpD/jP1xcniHn/a3zLF/1JhSBX3dNN+/Ten7f79KeIe
ftfXVemb05gm7hmp89DuDIhRIl5auGK/miruOZDX01p5PVaxeGattujSxT2B
w2WGqOBoxWAbCVn6LF3c47M80ODSb5WHwPNoWJPx8v5IlWd998xreYNPyLXg
ubvJp+Pgzc3yMnj2/KH3qLPfT/4UPEvanSebJ7bI6NmL9ujZg/bomd9Fz2nU
HXpeon7R8yr1i555j565d/ScSu+i50jqDj0bqF/0/Dn1i555j56/oz165nfR
813qDj3rqF/0vIf6Rc+RtEfPvEfP9+hd9FxL3aFn7hc9c+/o2bc1qbX4iF7l
+bmUogd2XYLK8yfFTqknPl7lueC3l8PPmHUqzw6Py1+U1kapPHueWQ68mBmr
8sx79OxNe/T8Ar2Lng3UHXrmftHzCPWLnnmPnrl39BxH76Ln09Qdeube0TP3
jp55j565d/TMvaNn/s6i53+oX/TMvaPnVdqjZ96j52R6Fz1zd+iZ+0XPX1G/
6HlsSko+G5Gs8ny3t3OmYC1F5bklyzo/Xpei8vzH/Yy/O4OSVJ73h3dUFVmM
Ks8tFyZvf+1nUnnmPXpuoz16dtG76LmDukPPGuoXPedSv+iZ9+j5edqjZ+4d
PXPv6Jn7Rc/cO3rmPXrm3tFzPr2Lnrl39OxN/aJn7h09a2iPnrl39Kyjd9Ez
d4eeuV/07E79ome/Q+Uhgxu3qzwnmrzH82Z3qDzfcFy89mPJDpXn1AZP19hi
msrzsa3fx3zZlqry3Dx/4Fb+G+kqz6/THj3zHj3zu+i5lbpDz07qFz1zv+iZ
e0fPvEfP/C56/p26Q89W6hc9c+/o2UJ79Mx79MzvomfuDj37Ub/omb/X6Jn3
6Jn/H9Azv4ueuTv07KR+0TP3i57/B/CP9nk=
     "], 0.48]}, 
   {RGBColor[1., 0.709804, 0.709804], SphereBox[CompressedData["
1:eJxTTMoPSmViYGAwA2JmID5zeN0kkxhlh71dN86dYBV0SDz2l//PlT/2kxSV
Jiy7K+Gw/GbwvUZWSQen1klP/13hceCdU6t/PkLRYcIx074b3FIODFCALm65
5UTZvvmiDkKFLWGFT2Sg5ivCzQ9QfyV22kkNw3xc6iXEJjXFCvM5GBlNC1vK
qgpXPxnqzmUa7esudKjC3YMuDnNPd9Tq9koBYQeZCy5mazs04ebD3I9u/hmj
KhURXkO4uTD1UzaF/Tumo+2w3Pqt7ZN//+1h6t/Me1iUyG3gsKx8V508DxNc
H7o4zD0ht9oTdQx0McK/98n0tPgGIwzzcanHFZ4wd6LHF7o4zD2C/tJVBm4a
GOEPcz+6+bjU4wpPmDvR4wtdHOaec9D0iR5fMPejm49LPSw9Tyxn2tfZoYuR
nlnzPotu5dbDSM8wcZh7RFDSpyFG+KObz7/vGbfAd1OM9IMrfvW1/KJiv5pg
pB90cZh7cisMJISajDHSw8V8Fr/oLHMM83GpxxW/MHeipx90cZh7YPkFPT0Y
QN2Pbj4u9bji9zUsH6GlH3Rx9PyFnh76oO5HNx8AqEIxBQ==
     "], 0.87]}, 
   {RGBColor[0.941176, 0.784314, 0.627451], SphereBox[CompressedData["
1:eJxTTMoPSmViYGCQAGJmIOboWFLIXMnksLfrxrkTrIYOicf+8v+58sceIv5p
f0XcdqHtrMYOTq2Tnv67wuMgcWn/ydvXvthvurl+n4+7sQMDFKCLW245UbZv
vqhDQ8CtA4feHdqfs7aPydrdFG6+hNikplhhPgd080UKW8IKn8hguAeX+imK
ShOW3ZVwQHcPujjMPT1Rq9srBYQd0N3DO6dW/3yEIob5IbfaE3UMdB1kLriY
re3QhKsPUH8ldtpJzWFiOdO+zg5duPrJm8L+HdPRdmDN+yy6lVsP7h50cZh7
BPylqwzcNDD8+2bew6JEbgMM83Gpx+V+mDvRwwddHOaeM4fXTTKJUcYIn6lQ
96ObDwCXGP2f
     "], 1.11]}},
  AlignmentPoint->Center,
  AspectRatio->Automatic,
  Axes->False,
  AxesEdge->Automatic,
  AxesLabel->None,
  AxesOrigin->Automatic,
  AxesStyle->{},
  Background->None,
  BaseStyle->{},
  BaselinePosition->Automatic,
  BoxRatios->Automatic,
  BoxStyle->{},
  Boxed->False,
  ClipPlanes->None,
  ClipPlanesStyle->Automatic,
  ColorOutput->Automatic,
  ContentSelectable->Automatic,
  ControllerLinking->Automatic,
  ControllerMethod->Automatic,
  ControllerPath->Automatic,
  CoordinatesToolOptions:>Automatic,
  DisplayFunction->Identity,
  Epilog->{},
  FaceGrids->None,
  FaceGridsStyle->{},
  FormatType->TraditionalForm,
  ImageMargins->0.,
  ImagePadding->All,
  ImageSize->Automatic,
  ImageSizeRaw->Automatic,
  LabelStyle->{},
  Lighting->"Neutral",
  Method->Automatic,
  PlotLabel->None,
  PlotRange->All,
  PlotRangePadding->Automatic,
  PlotRegion->Automatic,
  PreserveImageOptions->Automatic,
  Prolog->{},
  RotationAction->"Fit",
  SphericalRegion->True,
  Ticks->Automatic,
  TicksStyle->{},
  TouchscreenAutoZoom->False,
  ViewAngle->Automatic,
  ViewCenter->Automatic,
  ViewMatrix->Automatic,
  ViewPoint->Above,
  ViewProjection->Automatic,
  ViewRange->All,
  ViewVector->Automatic,
  ViewVertical->{0, 0, 1}]], "Output",
 CellChangeTimes->{
  3.782072840540949*^9, {3.782072874404333*^9, 3.782072929507832*^9}},
 CellLabel->"Out[8]=",
 CellID->1113246531,ExpressionUUID->"3934e05d-b73a-426c-8a79-9d547a1070ee"]
}, Open  ]]
}, Open  ]],

Cell[CellGroupData[{

Cell["More Examples", "ExtendedExamplesSection",
 CellTags->"ExtendedExamples",
 CellID->1854448968,ExpressionUUID->"42d70f0f-37a0-4b44-a088-1361891c78c7"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Scope", "ExampleSection",ExpressionUUID->
   "59ef7264-5e10-403a-9481-567216f7063a"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1293636265,ExpressionUUID->"43ad91d5-4a35-4140-873e-71ba6f836772"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Generalizations & Extensions", "ExampleSection",ExpressionUUID->
   "55e09adf-f643-4243-8fd6-93a3cffdcc8f"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1020263627,ExpressionUUID->"4565013f-7dc3-4c3d-995b-56a8e2deaa34"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "Options", "ExampleSection",ExpressionUUID->
   "096f8df1-6f4a-4aae-a394-3e89cfcd3d8c"],
  $Line = 0; Null]], "ExampleSection",
 CellID->2061341341,ExpressionUUID->"65ded90e-3431-4fb5-91c4-1d6fcc9448e1"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\"SelectionMethod\"", "ExampleSubsection",ExpressionUUID->
   "c1a1a4f3-63d4-478d-bc96-5aa00909352f"],
  $Line = 0; Null]], "ExampleSubsection",
 CellChangeTimes->{{3.771147827200502*^9, 3.7711478308793297`*^9}},
 CellID->541763087,ExpressionUUID->"833ad378-596d-485e-b3fb-06188d6adb45"],

Cell["\<\
In this example, we will be using a simple couple of demo crystal structures:\
\
\>", "ExampleText",
 CellChangeTimes->{{3.7711348786446247`*^9, 3.771134894446722*^9}, {
  3.771135064467127*^9, 3.771135141341597*^9}},
 CellID->1308282002,ExpressionUUID->"1ee87541-a91e-410c-becb-2571eb6fafe4"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"$CrystalData", "=", 
   RowBox[{"Import", "@", 
    RowBox[{"First", "@", 
     RowBox[{"FileNames", "[", 
      RowBox[{"\"\<DemoBlocksAB.m\>\"", ",", 
       RowBox[{"{", "$MaXrdPath", "}"}], ",", "2"}], "]"}]}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"blocks", "=", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"blockAu", ",", "blockAg"}], "}"}], "=", 
    RowBox[{"Keys", "@", "$CrystalData"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"CrystalPlot", "/@", "blocks"}]}], "Input",
 CellChangeTimes->{{3.7710622492926607`*^9, 3.771062255592668*^9}},
 CellLabel->"In[1]:=",
 CellID->210545981,ExpressionUUID->"bf521d8e-121f-4e65-8098-c43629d6e923"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   Graphics3DBox[{
     {RGBColor[1, 0, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {5., 0., 0.}}]]}, 
     {RGBColor[0, 1, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 5., 0.}}]]}, 
     {RGBColor[0, 0, 1], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 0., 5.}}]]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 5., 0.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 5.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 5.}, {5., 5., 5.}}]}, 
     {RGBColor[1., 0.819608, 0.137255], 
      SphereBox[{{0., 0., 0.}, {0., 0., 5.}, {0., 5., 0.}, {0., 5., 5.}, {5., 
       0., 0.}, {5., 0., 5.}, {5., 5., 0.}, {5., 5., 5.}}, 1.74]}},
    AlignmentPoint->Center,
    AspectRatio->Automatic,
    Axes->False,
    AxesEdge->Automatic,
    AxesLabel->None,
    AxesOrigin->Automatic,
    AxesStyle->{},
    Background->None,
    BaseStyle->{},
    BaselinePosition->Automatic,
    BoxRatios->Automatic,
    BoxStyle->{},
    Boxed->False,
    ClipPlanes->None,
    ClipPlanesStyle->Automatic,
    ColorOutput->Automatic,
    ContentSelectable->Automatic,
    ControllerLinking->Automatic,
    ControllerMethod->Automatic,
    ControllerPath->Automatic,
    CoordinatesToolOptions:>Automatic,
    DisplayFunction->Identity,
    Epilog->{},
    FaceGrids->None,
    FaceGridsStyle->{},
    FormatType->TraditionalForm,
    ImageMargins->0.,
    ImagePadding->All,
    ImageSize->Automatic,
    ImageSizeRaw->Automatic,
    LabelStyle->{},
    Lighting->"Neutral",
    Method->Automatic,
    PlotLabel->None,
    PlotRange->All,
    PlotRangePadding->Automatic,
    PlotRegion->Automatic,
    PreserveImageOptions->Automatic,
    Prolog->{},
    RotationAction->"Fit",
    SphericalRegion->True,
    Ticks->Automatic,
    TicksStyle->{},
    TouchscreenAutoZoom->False,
    ViewAngle->Automatic,
    ViewCenter->Automatic,
    ViewMatrix->Automatic,
    ViewPoint->{1.3, -2.4, 2.},
    ViewProjection->Automatic,
    ViewRange->All,
    ViewVector->Automatic,
    ViewVertical->{0, 0, 1}], ",", 
   Graphics3DBox[{
     {RGBColor[1, 0, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {5., 0., 0.}}]]}, 
     {RGBColor[0, 1, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 5., 0.}}]]}, 
     {RGBColor[0, 0, 1], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 0., 5.}}]]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 5., 0.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 5.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 5.}, {5., 5., 5.}}]}, 
     {RGBColor[0.752941, 0.752941, 0.752941], 
      SphereBox[{{0., 0., 0.}, {0., 0., 5.}, {0., 5., 0.}, {0., 5., 5.}, {5., 
       0., 0.}, {5., 0., 5.}, {5., 5., 0.}, {5., 5., 5.}}, 1.65]}},
    AlignmentPoint->Center,
    AspectRatio->Automatic,
    Axes->False,
    AxesEdge->Automatic,
    AxesLabel->None,
    AxesOrigin->Automatic,
    AxesStyle->{},
    Background->None,
    BaseStyle->{},
    BaselinePosition->Automatic,
    BoxRatios->Automatic,
    BoxStyle->{},
    Boxed->False,
    ClipPlanes->None,
    ClipPlanesStyle->Automatic,
    ColorOutput->Automatic,
    ContentSelectable->Automatic,
    ControllerLinking->Automatic,
    ControllerMethod->Automatic,
    ControllerPath->Automatic,
    CoordinatesToolOptions:>Automatic,
    DisplayFunction->Identity,
    Epilog->{},
    FaceGrids->None,
    FaceGridsStyle->{},
    FormatType->TraditionalForm,
    ImageMargins->0.,
    ImagePadding->All,
    ImageSize->Automatic,
    ImageSizeRaw->Automatic,
    LabelStyle->{},
    Lighting->"Neutral",
    Method->Automatic,
    PlotLabel->None,
    PlotRange->All,
    PlotRangePadding->Automatic,
    PlotRegion->Automatic,
    PreserveImageOptions->Automatic,
    Prolog->{},
    RotationAction->"Fit",
    SphericalRegion->True,
    Ticks->Automatic,
    TicksStyle->{},
    TouchscreenAutoZoom->False,
    ViewAngle->Automatic,
    ViewCenter->Automatic,
    ViewMatrix->Automatic,
    ViewPoint->{1.3, -2.4, 2.},
    ViewProjection->Automatic,
    ViewRange->All,
    ViewVector->Automatic,
    ViewVertical->{0, 0, 1}]}], "}"}]], "Output",
 CellChangeTimes->{3.771150095059861*^9, 3.771150225159666*^9, 
  3.771150278467161*^9, 3.782072987178372*^9},
 CellLabel->"Out[3]=",
 CellID->1504095499,ExpressionUUID->"e03a42f4-bf79-45ab-809f-80122e5de075"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"Table", "[", 
  RowBox[{
   RowBox[{"CrystalPlot", "[", 
    RowBox[{
     RowBox[{"SynthesiseStructure", "[", 
      RowBox[{"blocks", ",", 
       RowBox[{"{", 
        RowBox[{"5", ",", "5", ",", "1"}], "}"}], ",", "\"\<Demo\>\"", ",", 
       "\[IndentingNewLine]", 
       RowBox[{"\"\<SelectionMethod\>\"", "\[Rule]", "s"}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"\"\<UsePlacementBuffer\>\"", "\[Rule]", "True"}]}], "]"}], 
     ",", 
     RowBox[{"ViewPoint", "\[Rule]", "Above"}]}], "]"}], ",", 
   RowBox[{"{", 
    RowBox[{"s", ",", 
     RowBox[{"{", 
      RowBox[{"\"\<Sequential\>\"", ",", "\"\<Random\>\""}], "}"}]}], "}"}]}],
   "]"}]], "Input",
 CellChangeTimes->{{3.771150121994193*^9, 3.771150132633197*^9}, {
  3.771150202282584*^9, 3.7711502196946783`*^9}},
 CellLabel->"In[4]:=",
 CellID->684924312,ExpressionUUID->"cb81cd19-6659-4c70-9f2e-390e60502900"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   Graphics3DBox[{
     {RGBColor[1, 0, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {5., 0., 0.}}]]}, 
     {RGBColor[0, 1, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 5., 0.}}]]}, 
     {RGBColor[0, 0, 1], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 0., 5.}}]]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 5., 0.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 5.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 5.}, {5., 5., 5.}}]}, 
     {RGBColor[1., 0.819608, 0.137255], SphereBox[CompressedData["
1:eJyV1TEKwkAQRuGgV8gFBGsrmzQhQvAAHkEQ7LxCjq7NpPgmY5KFsOzL898h
7Kyn5+fxOjRN8/49x2bvaIf/a7nz1rzqd2vvr8U+wfW7wg/uPubL9c2XW89Y
1BMcf7ov+zO3HvPl+ClfHv6ZOYZc/1L4wVvW5sv1zZdbT1/UExx/ui37M7ce
8+X4KV9encsYW8+r/to5jrH3fK/1lfXK9d1fbj3my/XNl1uP/SXHT/0ltx7z
5fgpXx5+nD/7S65vf8njvojzSn7i+pfCt397Zuuxv3r2wbe/5jX5ieObn3h1
L8fYel/rr93jUc/W+12/+l+xv+T69pfceshPXL8rfPt3ZLYev+vIPvh+p3lN
fuL45ifeDl/BhHs/
       "], 1.74]}, 
     {RGBColor[0.752941, 0.752941, 0.752941], SphereBox[CompressedData["
1:eJyV1EFKw1AUheGH3UI2IDjuyEknEkG6gK6gCI7dQpauA0/A7+aS9EEp/P17
cvKS+54/v29fT2OM++/nNFwvc0H/+MTv58YPn/g2X65vvtw+b02fcPzlfdtf
uX3Ml+OXfHm3L1lH90t/bx+zHt3fvef62vQJ1780frh9zJfrmy+3z0fTJxx/
uW77K7eP+XL8ki+Pn/v3fZHr+/zl8bNf5sv1zZfbx/mS45f5ktvHfDl+yZd3
50LW0fNCf+8c+VuHzxf97lxzvuT6zpfcPuQXrn9pfOc313W+5PhlvuT2Ib9w
fPMLT5/83/mS6ztf8vTJ9cgvXP/c+M5vruv7Lscv76/cPuQXjm9+4dP8A4za
dhc=
       "], 1.65]}},
    AlignmentPoint->Center,
    AspectRatio->Automatic,
    Axes->False,
    AxesEdge->Automatic,
    AxesLabel->None,
    AxesOrigin->Automatic,
    AxesStyle->{},
    Background->None,
    BaseStyle->{},
    BaselinePosition->Automatic,
    BoxRatios->Automatic,
    BoxStyle->{},
    Boxed->False,
    ClipPlanes->None,
    ClipPlanesStyle->Automatic,
    ColorOutput->Automatic,
    ContentSelectable->Automatic,
    ControllerLinking->Automatic,
    ControllerMethod->Automatic,
    ControllerPath->Automatic,
    CoordinatesToolOptions:>Automatic,
    DisplayFunction->Identity,
    Epilog->{},
    FaceGrids->None,
    FaceGridsStyle->{},
    FormatType->TraditionalForm,
    ImageMargins->0.,
    ImagePadding->All,
    ImageSize->Automatic,
    ImageSizeRaw->Automatic,
    LabelStyle->{},
    Lighting->"Neutral",
    Method->Automatic,
    PlotLabel->None,
    PlotRange->All,
    PlotRangePadding->Automatic,
    PlotRegion->Automatic,
    PreserveImageOptions->Automatic,
    Prolog->{},
    RotationAction->"Fit",
    SphericalRegion->True,
    Ticks->Automatic,
    TicksStyle->{},
    TouchscreenAutoZoom->False,
    ViewAngle->Automatic,
    ViewCenter->Automatic,
    ViewMatrix->Automatic,
    ViewPoint->Above,
    ViewProjection->Automatic,
    ViewRange->All,
    ViewVector->Automatic,
    ViewVertical->{0, 0, 1}], ",", 
   Graphics3DBox[{
     {RGBColor[1, 0, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {5., 0., 0.}}]]}, 
     {RGBColor[0, 1, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 5., 0.}}]]}, 
     {RGBColor[0, 0, 1], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 0., 5.}}]]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 5., 0.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 5.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 5.}, {5., 5., 5.}}]}, 
     {RGBColor[0.752941, 0.752941, 0.752941], SphereBox[CompressedData["
1:eJyV1TEKwkAURdGgW3ADQmorG5ugIFmAKxDB2i24dC3yI56fb+KAhFyvL89h
JrO9PS73VdM01/dn3fw7Nsff93KvS/Oq3819fy6eExz/2U/7I/c55svxU748
/Ha47vHl+ofCDx7+rsiX65svt09X9AmO/zxN+yO3j/ly/JQvDz/+v/ly/JQv
Dz/my3w5fsqX29/1Kbe/61Nuf/Pl9jdfHr7zEkOu7/6Xx35zHoeRuL7vC7l9
3F9yffeX3D7kJ65/KHz3b8fVPs5rx3PwnafxnvzE8c1P3P6uT7n9XZ9y+5Of
uP37aT+t/7lzK0Z13ujPnUPRZ+n5pF+di+23n7h+vL/1g9uH/MT1d4X/yX8B
VSJ5sw==
       "], 1.65]}, 
     {RGBColor[1., 0.819608, 0.137255], SphereBox[CompressedData["
1:eJyV1TEKwkAQheGgV8gFBOtUNmlEQXIAjyAIdl4hR9dmgn6TIcmCCL8/L4/Z
7Hp4vO/PXdM0r+9n37iOl4T+eMvvXeEHb/k2X65vvtw+p6JPcP2+8IPbx3y5
vvly+5yLPsHxx+u8P3H7mC/HT/nyal9jrd1v/aX3INbW92PpvbSvXN/ny+1j
vlzffLl9bkWf4PjjMO9P3D7my/FTvrw6V7HWnjf9pXMYa+v5XLoX3F+5vvsr
t4/5cn3z5fZx3nJ95ye3j/lyffPl3l/OR67vfOTed+Qnrt8VvvOP8+N85PrO
Rx594ryRn7h+X/jOP57r/4scP/2/yO1DfuL45iduf+83uf293+T2Jz9x+w/z
/k/+BzIOd6M=
       "], 1.74]}},
    AlignmentPoint->Center,
    AspectRatio->Automatic,
    Axes->False,
    AxesEdge->Automatic,
    AxesLabel->None,
    AxesOrigin->Automatic,
    AxesStyle->{},
    Background->None,
    BaseStyle->{},
    BaselinePosition->Automatic,
    BoxRatios->Automatic,
    BoxStyle->{},
    Boxed->False,
    ClipPlanes->None,
    ClipPlanesStyle->Automatic,
    ColorOutput->Automatic,
    ContentSelectable->Automatic,
    ControllerLinking->Automatic,
    ControllerMethod->Automatic,
    ControllerPath->Automatic,
    CoordinatesToolOptions:>Automatic,
    DisplayFunction->Identity,
    Epilog->{},
    FaceGrids->None,
    FaceGridsStyle->{},
    FormatType->TraditionalForm,
    ImageMargins->0.,
    ImagePadding->All,
    ImageSize->Automatic,
    ImageSizeRaw->Automatic,
    LabelStyle->{},
    Lighting->"Neutral",
    Method->Automatic,
    PlotLabel->None,
    PlotRange->All,
    PlotRangePadding->Automatic,
    PlotRegion->Automatic,
    PreserveImageOptions->Automatic,
    Prolog->{},
    RotationAction->"Fit",
    SphericalRegion->True,
    Ticks->Automatic,
    TicksStyle->{},
    TouchscreenAutoZoom->False,
    ViewAngle->Automatic,
    ViewCenter->Automatic,
    ViewMatrix->Automatic,
    ViewPoint->Above,
    ViewProjection->Automatic,
    ViewRange->All,
    ViewVector->Automatic,
    ViewVertical->{0, 0, 1}]}], "}"}]], "Output",
 CellChangeTimes->{{3.7711501235316973`*^9, 3.7711501329262857`*^9}, {
   3.771150220595488*^9, 3.771150226246545*^9}, 3.771150278690831*^9, 
   3.782072988916272*^9},
 CellLabel->"Out[4]=",
 CellID->287750519,ExpressionUUID->"6b14c0d4-47b0-45fc-a4aa-d239eb659325"]
}, Open  ]],

Cell[TextData[{
 "Restoring ",
 Cell[BoxData[
  ButtonBox["$CrystalData",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/$CrystalData"]], "InlineFormula",
  ExpressionUUID->"df84cdf6-211d-4186-b9f3-b86702505c54"],
 ":"
}], "ExampleText",
 CellChangeTimes->{{3.771135573094782*^9, 3.77113559261269*^9}},
 CellID->1005212952,ExpressionUUID->"a82ca3e3-8088-4c7f-8ead-f06464e36981"],

Cell[BoxData[
 RowBox[{
  RowBox[{"$CrystalData", "=", 
   RowBox[{"Import", "@", 
    RowBox[{"FileNameJoin", "[", 
     RowBox[{"{", 
      RowBox[{
      "$MaXrdPath", ",", "\"\<Core\>\"", ",", "\"\<Data\>\"", ",", 
       "\"\<CrystalData.m\>\""}], "}"}], "]"}]}]}], ";"}]], "Input",
 CellChangeTimes->{{3.7711355945793324`*^9, 3.771135631844901*^9}},
 CellLabel->"In[5]:=",
 CellID->360233315,ExpressionUUID->"b9d6239d-053a-47fb-8302-dfefc07586ac"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\"UsePlacementBuffer\"", "ExampleSubsection",ExpressionUUID->
   "b583acd4-7606-4e53-af4b-b1de86ff0fbc"],
  $Line = 0; Null]], "ExampleSubsection",
 CellChangeTimes->{{3.770979846029162*^9, 3.770979851487219*^9}, {
  3.771147813520802*^9, 3.7711478173114347`*^9}},
 CellID->1757724783,ExpressionUUID->"8c05d0d0-0ac8-43c0-952c-34bc850a021e"],

Cell["\<\
In this example, we will be using a simple couple of demo crystal structures:\
\
\>", "ExampleText",
 CellChangeTimes->{{3.7711348786446247`*^9, 3.771134894446722*^9}, {
  3.771135064467127*^9, 3.771135141341597*^9}},
 CellID->268543758,ExpressionUUID->"d3a585cd-d821-4748-ba54-24c6bfda155b"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"$CrystalData", "=", 
   RowBox[{"Import", "@", 
    RowBox[{"First", "@", 
     RowBox[{"FileNames", "[", 
      RowBox[{"\"\<DemoBlocksAB.m\>\"", ",", 
       RowBox[{"{", "$MaXrdPath", "}"}], ",", "2"}], "]"}]}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"blocks", "=", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"blockAu", ",", "blockAg"}], "}"}], "=", 
    RowBox[{"Keys", "@", "$CrystalData"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"CrystalPlot", "/@", "blocks"}]}], "Input",
 CellChangeTimes->{{3.7710622492926607`*^9, 3.771062255592668*^9}},
 CellLabel->"In[1]:=",
 CellID->1212570482,ExpressionUUID->"b8e04f33-9f03-4405-94c8-1189dd4f318c"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   Graphics3DBox[{
     {RGBColor[1, 0, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {5., 0., 0.}}]]}, 
     {RGBColor[0, 1, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 5., 0.}}]]}, 
     {RGBColor[0, 0, 1], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 0., 5.}}]]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 5., 0.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 5.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 5.}, {5., 5., 5.}}]}, 
     {RGBColor[1., 0.819608, 0.137255], 
      SphereBox[{{0., 0., 0.}, {0., 0., 5.}, {0., 5., 0.}, {0., 5., 5.}, {5., 
       0., 0.}, {5., 0., 5.}, {5., 5., 0.}, {5., 5., 5.}}, 1.74]}},
    AlignmentPoint->Center,
    AspectRatio->Automatic,
    Axes->False,
    AxesEdge->Automatic,
    AxesLabel->None,
    AxesOrigin->Automatic,
    AxesStyle->{},
    Background->None,
    BaseStyle->{},
    BaselinePosition->Automatic,
    BoxRatios->Automatic,
    BoxStyle->{},
    Boxed->False,
    ClipPlanes->None,
    ClipPlanesStyle->Automatic,
    ColorOutput->Automatic,
    ContentSelectable->Automatic,
    ControllerLinking->Automatic,
    ControllerMethod->Automatic,
    ControllerPath->Automatic,
    CoordinatesToolOptions:>Automatic,
    DisplayFunction->Identity,
    Epilog->{},
    FaceGrids->None,
    FaceGridsStyle->{},
    FormatType->TraditionalForm,
    ImageMargins->0.,
    ImagePadding->All,
    ImageSize->Automatic,
    ImageSizeRaw->Automatic,
    LabelStyle->{},
    Lighting->"Neutral",
    Method->Automatic,
    PlotLabel->None,
    PlotRange->All,
    PlotRangePadding->Automatic,
    PlotRegion->Automatic,
    PreserveImageOptions->Automatic,
    Prolog->{},
    RotationAction->"Fit",
    SphericalRegion->True,
    Ticks->Automatic,
    TicksStyle->{},
    TouchscreenAutoZoom->False,
    ViewAngle->Automatic,
    ViewCenter->Automatic,
    ViewMatrix->Automatic,
    ViewPoint->{1.3, -2.4, 2.},
    ViewProjection->Automatic,
    ViewRange->All,
    ViewVector->Automatic,
    ViewVertical->{0, 0, 1}], ",", 
   Graphics3DBox[{
     {RGBColor[1, 0, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {5., 0., 0.}}]]}, 
     {RGBColor[0, 1, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 5., 0.}}]]}, 
     {RGBColor[0, 0, 1], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 0., 5.}}]]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 5., 0.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 5.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 5.}, {5., 5., 5.}}]}, 
     {RGBColor[0.752941, 0.752941, 0.752941], 
      SphereBox[{{0., 0., 0.}, {0., 0., 5.}, {0., 5., 0.}, {0., 5., 5.}, {5., 
       0., 0.}, {5., 0., 5.}, {5., 5., 0.}, {5., 5., 5.}}, 1.65]}},
    AlignmentPoint->Center,
    AspectRatio->Automatic,
    Axes->False,
    AxesEdge->Automatic,
    AxesLabel->None,
    AxesOrigin->Automatic,
    AxesStyle->{},
    Background->None,
    BaseStyle->{},
    BaselinePosition->Automatic,
    BoxRatios->Automatic,
    BoxStyle->{},
    Boxed->False,
    ClipPlanes->None,
    ClipPlanesStyle->Automatic,
    ColorOutput->Automatic,
    ContentSelectable->Automatic,
    ControllerLinking->Automatic,
    ControllerMethod->Automatic,
    ControllerPath->Automatic,
    CoordinatesToolOptions:>Automatic,
    DisplayFunction->Identity,
    Epilog->{},
    FaceGrids->None,
    FaceGridsStyle->{},
    FormatType->TraditionalForm,
    ImageMargins->0.,
    ImagePadding->All,
    ImageSize->Automatic,
    ImageSizeRaw->Automatic,
    LabelStyle->{},
    Lighting->"Neutral",
    Method->Automatic,
    PlotLabel->None,
    PlotRange->All,
    PlotRangePadding->Automatic,
    PlotRegion->Automatic,
    PreserveImageOptions->Automatic,
    Prolog->{},
    RotationAction->"Fit",
    SphericalRegion->True,
    Ticks->Automatic,
    TicksStyle->{},
    TouchscreenAutoZoom->False,
    ViewAngle->Automatic,
    ViewCenter->Automatic,
    ViewMatrix->Automatic,
    ViewPoint->{1.3, -2.4, 2.},
    ViewProjection->Automatic,
    ViewRange->All,
    ViewVector->Automatic,
    ViewVertical->{0, 0, 1}]}], "}"}]], "Output",
 CellChangeTimes->{{3.771147769510188*^9, 3.771147787783849*^9}, 
   3.771148683136566*^9, 3.7711498123043203`*^9, 3.771150153865069*^9, 
   3.7712385022181597`*^9, 3.771238613017025*^9, 3.771239159918551*^9, 
   3.782073001660182*^9},
 CellLabel->"Out[3]=",
 CellID->1309206604,ExpressionUUID->"a04922ac-70f7-4ee8-91d0-b61f69584405"]
}, Open  ]],

Cell[TextData[{
 "By setting ",
 Cell[BoxData["\<\"UsePlacementBuffer\"\>"], "InlineFormula",ExpressionUUID->
  "effae84e-72b6-4a85-adcc-733f172c5dba"],
 " to ",
 Cell[BoxData[
  ButtonBox["True",
   BaseStyle->"Link",
   ButtonData->"ref/True"]], "InlineFormula",ExpressionUUID->
  "8531d425-db46-4737-9043-7a7365e80fa8"],
 ", the blocks are not assembled \[OpenCurlyDoubleQuote]edge-to-edge\
\[CloseCurlyDoubleQuote], but rather have a buffer between themselves equal \
to the size of the blocks."
}], "ExampleText",
 CellChangeTimes->{{3.7711487129338713`*^9, 3.771148776070256*^9}, {
  3.77114920889412*^9, 3.771149276442664*^9}, {3.771149319874015*^9, 
  3.771149344625143*^9}},
 CellID->1943084892,ExpressionUUID->"187e6a83-6768-4ebb-acfe-1466c472510e"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"CrystalPlot", "@", 
  RowBox[{"SynthesiseStructure", "[", 
   RowBox[{"blocks", ",", 
    RowBox[{"{", 
     RowBox[{"3", ",", "3", ",", "3"}], "}"}], ",", "\"\<Demo\>\"", ",", 
    "\[IndentingNewLine]", 
    RowBox[{"\"\<UsePlacementBuffer\>\"", "\[Rule]", "True"}]}], 
   "]"}]}]], "Input",
 CellChangeTimes->{{3.7711421735407963`*^9, 3.7711421736667023`*^9}, {
  3.771142335969346*^9, 3.771142338231159*^9}, {3.771143100344084*^9, 
  3.771143101730549*^9}, {3.7711432645308437`*^9, 3.7711432976446466`*^9}, {
  3.771143375311919*^9, 3.771143376950481*^9}, {3.771143420972313*^9, 
  3.771143502307146*^9}, {3.7711479504204206`*^9, 3.771147953592929*^9}, {
  3.771150142419238*^9, 3.771150144368305*^9}, {3.771238494107621*^9, 
  3.771238495149087*^9}},
 CellLabel->"In[4]:=",
 CellID->697724628,ExpressionUUID->"d7f6bf55-73d6-4edb-991e-a105b4a450c3"],

Cell[BoxData[
 Graphics3DBox[{
   {RGBColor[1, 0, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {5., 0., 0.}}]]}, 
   {RGBColor[0, 1, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 5., 0.}}]]}, 
   {RGBColor[0, 0, 1], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 0., 5.}}]]}, 
   {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {5., 5., 0.}}]}, 
   {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 5., 0.}}]}, 
   {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 0., 5.}}]}, 
   {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {0., 5., 5.}}]}, 
   {GrayLevel[0], Line3DBox[{{5., 5., 0.}, {5., 5., 5.}}]}, 
   {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {5., 0., 5.}}]}, 
   {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {0., 5., 5.}}]}, 
   {GrayLevel[0], Line3DBox[{{0., 5., 5.}, {5., 5., 5.}}]}, 
   {GrayLevel[0], Line3DBox[{{5., 0., 5.}, {5., 5., 5.}}]}, 
   {RGBColor[1., 0.819608, 0.137255], SphereBox[CompressedData["
1:eJyVlbENAkEMBE/QwjeA9PFHl5B9DZSARAz9R5A4YNCwfkvIumWxfbZvudyf
t8dpjPH6fM7jqC37/zNx+m48+1037hT8KvHIL7z4zDMFJ5/xibOedf/2xDfg
dSa/8PILeKvg5DM+cdZjfU/9oqU+lh3tb3euzFNnxqsz+YUzD+MTJ5/xiZe3
fbG9sPl355z20fYu7Ve6h8WzuiwP6+3eu/uupuCc1yb8DXzWOQUnn/GJsx6r
O+Wze1oddv9Un/Ul6U6Z6QX5SUfKjupLV9dMh0wPTFeoE4xvema6lfQpvQOb
t+2Z7UF6T/Zu0l6mOVg/yE99KuvqO/npf8U88/FMnL4bz373+/0bSUp0uw==

     "], 1.74]}, 
   {RGBColor[0.752941, 0.752941, 0.752941], SphereBox[CompressedData["
1:eJyVlDEOwkAQAyP4Qj6AlJoqTbq8gScgIdHx/w4aN0NGvqwUneJzNnv27t2e
n8frMk3T+/dcJ4tlP8bvwOf9mB88/Bn7i+DkMz9x1mN1t/8xWh2Js/WN6rIK
vgFPHvKDh886V8HJZ37irCc86hSceuR78oNTJ+YnTj7zE79jnzHqN/mtDxJn
+2O0L80H08N0pU7Mb36ab82fttIvvhPnOprPvmv7Nrdt3shvc5g4O5+j9wL7
Ie/0axP+hpV1sh+Yn3WSz/xN94TpZT6Zju0+Nn2br22ObZ7Ib3OWGL0fyW/3
svWR+Wl9QZ9H+9H6rvVXO4fls7rsP00PO/f/+b4k/G9/
     "], 1.65]}},
  AlignmentPoint->Center,
  AspectRatio->Automatic,
  Axes->False,
  AxesEdge->Automatic,
  AxesLabel->None,
  AxesOrigin->Automatic,
  AxesStyle->{},
  Background->None,
  BaseStyle->{},
  BaselinePosition->Automatic,
  BoxRatios->Automatic,
  BoxStyle->{},
  Boxed->False,
  ClipPlanes->None,
  ClipPlanesStyle->Automatic,
  ColorOutput->Automatic,
  ContentSelectable->Automatic,
  ControllerLinking->Automatic,
  ControllerMethod->Automatic,
  ControllerPath->Automatic,
  CoordinatesToolOptions:>Automatic,
  DisplayFunction->Identity,
  Epilog->{},
  FaceGrids->None,
  FaceGridsStyle->{},
  FormatType->TraditionalForm,
  ImageMargins->0.,
  ImagePadding->All,
  ImageSize->Automatic,
  ImageSizeRaw->Automatic,
  LabelStyle->{},
  Lighting->"Neutral",
  Method->Automatic,
  PlotLabel->None,
  PlotRange->All,
  PlotRangePadding->Automatic,
  PlotRegion->Automatic,
  PreserveImageOptions->Automatic,
  Prolog->{},
  RotationAction->"Fit",
  SphericalRegion->True,
  Ticks->Automatic,
  TicksStyle->{},
  TouchscreenAutoZoom->False,
  ViewAngle->Automatic,
  ViewCenter->Automatic,
  ViewMatrix->Automatic,
  ViewPoint->{1.3, -2.4, 2.},
  ViewProjection->Automatic,
  ViewRange->All,
  ViewVector->Automatic,
  ViewVertical->{0, 0, 1}]], "Output",
 CellChangeTimes->{
  3.771149303123892*^9, 3.7711493500970707`*^9, 3.7711498124612103`*^9, 
   3.7711501540172873`*^9, 3.771238504097857*^9, {3.771238546766471*^9, 
   3.771238561630659*^9}, 3.7712386149732122`*^9, 3.7712391600793533`*^9, 
   3.782073003957114*^9},
 CellLabel->"Out[4]=",
 CellID->1793761473,ExpressionUUID->"47874513-8132-48de-8e50-bb7fd85743e7"]
}, Open  ]],

Cell[TextData[{
 "Note that since we synthesised the structure using buffers, the final size \
is approximately double of what was specified (",
 Cell[BoxData[
  FormBox[
   RowBox[{"N", "\[Rule]", 
    RowBox[{
     RowBox[{"2", "N"}], "-", "1"}]}], TraditionalForm]], "InlineMath",
  ExpressionUUID->"dfb206d7-a670-4115-b6fa-a87699f19c47"],
 "):"
}], "ExampleText",
 CellChangeTimes->{{3.771149353458798*^9, 3.7711493545607567`*^9}, {
  3.771149387168469*^9, 3.77114943370326*^9}, {3.77114978263948*^9, 
  3.771149796654552*^9}, {3.7711499031483393`*^9, 3.7711499208557377`*^9}, {
  3.771150181888647*^9, 3.771150182087164*^9}},
 CellID->63445816,ExpressionUUID->"4d5ae0c7-8da5-4319-a302-c730895f313e"],

Cell[CellGroupData[{

Cell[BoxData[
 RowBox[{"$CrystalData", "[", 
  RowBox[{
  "\"\<Demo\>\"", ",", "\"\<Notes\>\"", ",", "\"\<StructureSize\>\""}], 
  "]"}]], "Input",
 CellChangeTimes->{{3.771149751381528*^9, 3.7711497673756723`*^9}},
 CellLabel->"In[5]:=",
 CellID->1512743877,ExpressionUUID->"0556cec1-3824-4fda-980a-a338d1250418"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{"5", ",", "5", ",", "5"}], "}"}]], "Output",
 CellChangeTimes->{{3.771149760172538*^9, 3.7711497681070967`*^9}, 
   3.771149812566774*^9, 3.7711501541312*^9, 3.7712386180065937`*^9, 
   3.771239160180356*^9, 3.7820730071390867`*^9},
 CellLabel->"Out[5]=",
 CellID->1604604924,ExpressionUUID->"b40a44c8-48c3-4f03-b738-6676d5187783"]
}, Open  ]],

Cell[TextData[{
 "Restoring ",
 Cell[BoxData[
  ButtonBox["$CrystalData",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/$CrystalData"]], "InlineFormula",
  ExpressionUUID->"ca7be82f-11e8-47dd-ab91-e099a6edcd22"],
 ":"
}], "ExampleText",
 CellChangeTimes->{{3.771135573094782*^9, 3.77113559261269*^9}},
 CellID->1686906185,ExpressionUUID->"dbb66838-b4ae-49c4-baeb-e974b4ea452b"],

Cell[BoxData[
 RowBox[{
  RowBox[{"$CrystalData", "=", 
   RowBox[{"Import", "@", 
    RowBox[{"FileNameJoin", "[", 
     RowBox[{"{", 
      RowBox[{
      "$MaXrdPath", ",", "\"\<Core\>\"", ",", "\"\<Data\>\"", ",", 
       "\"\<CrystalData.m\>\""}], "}"}], "]"}]}]}], ";"}]], "Input",
 CellChangeTimes->{{3.7711355945793324`*^9, 3.771135631844901*^9}},
 CellLabel->"In[6]:=",
 CellID->1428394713,ExpressionUUID->"45752cf4-0afa-40fb-b1c4-5e5bde94a6d6"]
}, Open  ]],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[
  "\"RotationMap\"", "ExampleSubsection",ExpressionUUID->
   "02b94c41-2d4d-4970-9bc0-cff2de22b4d6"],
  $Line = 0; Null]], "ExampleSubsection",
 CellChangeTimes->{{3.780039273413094*^9, 3.780039276396953*^9}},
 CellID->947367356,ExpressionUUID->"37ddbdfa-1a53-4271-95b4-9a95453c1488"],

Cell["\<\
In this example, we will be using a simple couple of demo crystal structures:\
\
\>", "ExampleText",
 CellChangeTimes->{{3.7711348786446247`*^9, 3.771134894446722*^9}, {
  3.771135064467127*^9, 3.771135141341597*^9}},
 CellID->573456169,ExpressionUUID->"c901fa1f-fd95-4aff-a58e-e0d94044e3be"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"$CrystalData", "=", 
   RowBox[{"Import", "@", 
    RowBox[{"First", "@", 
     RowBox[{"FileNames", "[", 
      RowBox[{"\"\<DemoBlocksAB.m\>\"", ",", 
       RowBox[{"{", "$MaXrdPath", "}"}], ",", "2"}], "]"}]}]}]}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{"blocks", "=", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{"blockAu", ",", "blockAg"}], "}"}], "=", 
    RowBox[{"Keys", "@", "$CrystalData"}]}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"CrystalPlot", "/@", "blocks"}]}], "Input",
 CellChangeTimes->{{3.7710622492926607`*^9, 3.771062255592668*^9}},
 CellLabel->"In[1]:=",
 CellID->171224647,ExpressionUUID->"122ec9f8-6dbb-4650-bb1b-c537bf75a96b"],

Cell[BoxData[
 RowBox[{"{", 
  RowBox[{
   Graphics3DBox[{
     {RGBColor[1, 0, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {5., 0., 0.}}]]}, 
     {RGBColor[0, 1, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 5., 0.}}]]}, 
     {RGBColor[0, 0, 1], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 0., 5.}}]]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 5., 0.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 5.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 5.}, {5., 5., 5.}}]}, 
     {RGBColor[1., 0.819608, 0.137255], 
      SphereBox[{{0., 0., 0.}, {0., 0., 5.}, {0., 5., 0.}, {0., 5., 5.}, {5., 
       0., 0.}, {5., 0., 5.}, {5., 5., 0.}, {5., 5., 5.}}, 1.74]}},
    AlignmentPoint->Center,
    AspectRatio->Automatic,
    Axes->False,
    AxesEdge->Automatic,
    AxesLabel->None,
    AxesOrigin->Automatic,
    AxesStyle->{},
    Background->None,
    BaseStyle->{},
    BaselinePosition->Automatic,
    BoxRatios->Automatic,
    BoxStyle->{},
    Boxed->False,
    ClipPlanes->None,
    ClipPlanesStyle->Automatic,
    ColorOutput->Automatic,
    ContentSelectable->Automatic,
    ControllerLinking->Automatic,
    ControllerMethod->Automatic,
    ControllerPath->Automatic,
    CoordinatesToolOptions:>Automatic,
    DisplayFunction->Identity,
    Epilog->{},
    FaceGrids->None,
    FaceGridsStyle->{},
    FormatType->TraditionalForm,
    ImageMargins->0.,
    ImagePadding->All,
    ImageSize->Automatic,
    ImageSizeRaw->Automatic,
    LabelStyle->{},
    Lighting->"Neutral",
    Method->Automatic,
    PlotLabel->None,
    PlotRange->All,
    PlotRangePadding->Automatic,
    PlotRegion->Automatic,
    PreserveImageOptions->Automatic,
    Prolog->{},
    RotationAction->"Fit",
    SphericalRegion->True,
    Ticks->Automatic,
    TicksStyle->{},
    TouchscreenAutoZoom->False,
    ViewAngle->Automatic,
    ViewCenter->Automatic,
    ViewMatrix->Automatic,
    ViewPoint->{1.3, -2.4, 2.},
    ViewProjection->Automatic,
    ViewRange->All,
    ViewVector->Automatic,
    ViewVertical->{0, 0, 1}], ",", 
   Graphics3DBox[{
     {RGBColor[1, 0, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {5., 0., 0.}}]]}, 
     {RGBColor[0, 1, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 5., 0.}}]]}, 
     {RGBColor[0, 0, 1], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 0., 5.}}]]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 5., 0.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 5., 0.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {5., 0., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {0., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{0., 5., 5.}, {5., 5., 5.}}]}, 
     {GrayLevel[0], Line3DBox[{{5., 0., 5.}, {5., 5., 5.}}]}, 
     {RGBColor[0.752941, 0.752941, 0.752941], 
      SphereBox[{{0., 0., 0.}, {0., 0., 5.}, {0., 5., 0.}, {0., 5., 5.}, {5., 
       0., 0.}, {5., 0., 5.}, {5., 5., 0.}, {5., 5., 5.}}, 1.65]}},
    AlignmentPoint->Center,
    AspectRatio->Automatic,
    Axes->False,
    AxesEdge->Automatic,
    AxesLabel->None,
    AxesOrigin->Automatic,
    AxesStyle->{},
    Background->None,
    BaseStyle->{},
    BaselinePosition->Automatic,
    BoxRatios->Automatic,
    BoxStyle->{},
    Boxed->False,
    ClipPlanes->None,
    ClipPlanesStyle->Automatic,
    ColorOutput->Automatic,
    ContentSelectable->Automatic,
    ControllerLinking->Automatic,
    ControllerMethod->Automatic,
    ControllerPath->Automatic,
    CoordinatesToolOptions:>Automatic,
    DisplayFunction->Identity,
    Epilog->{},
    FaceGrids->None,
    FaceGridsStyle->{},
    FormatType->TraditionalForm,
    ImageMargins->0.,
    ImagePadding->All,
    ImageSize->Automatic,
    ImageSizeRaw->Automatic,
    LabelStyle->{},
    Lighting->"Neutral",
    Method->Automatic,
    PlotLabel->None,
    PlotRange->All,
    PlotRangePadding->Automatic,
    PlotRegion->Automatic,
    PreserveImageOptions->Automatic,
    Prolog->{},
    RotationAction->"Fit",
    SphericalRegion->True,
    Ticks->Automatic,
    TicksStyle->{},
    TouchscreenAutoZoom->False,
    ViewAngle->Automatic,
    ViewCenter->Automatic,
    ViewMatrix->Automatic,
    ViewPoint->{1.3, -2.4, 2.},
    ViewProjection->Automatic,
    ViewRange->All,
    ViewVector->Automatic,
    ViewVertical->{0, 0, 1}]}], "}"}]], "Output",
 CellChangeTimes->{3.782475540834483*^9, 3.782476030805931*^9},
 CellLabel->"Out[3]=",
 CellID->1208629608,ExpressionUUID->"3442cd26-9e25-4b57-8a22-ae8fa0ad0d04"]
}, Open  ]],

Cell["\<\
Here we set up a simple domain and plot it. We need to shift the rotation \
anchors of each unit by a half for them to rotate about their origins.\
\>", "ExampleText",
 CellChangeTimes->{{3.782480452620604*^9, 3.782480510102767*^9}},
 CellID->1280749984,ExpressionUUID->"06353d10-ae55-4cde-be0a-725d8e57491e"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"domain", "=", 
   RowBox[{"{", 
    RowBox[{
     RowBox[{"{", 
      RowBox[{"3", ",", "3", ",", "1"}], "}"}], ",", 
     RowBox[{"{", 
      RowBox[{
      "1", ",", "2", ",", "1", ",", "2", ",", "1", ",", "2", ",", "1", ",", 
       "2", ",", "1"}], "}"}]}], "}"}]}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"DomainPlot", "[", 
  RowBox[{"domain", ",", "\[IndentingNewLine]", 
   RowBox[{"\"\<RotationAnchorReference\>\"", "\[Rule]", "\"\<Unit\>\""}], 
   ",", "\[IndentingNewLine]", 
   RowBox[{"\"\<RotationMap\>\"", "\[Rule]", 
    RowBox[{"<|", 
     RowBox[{"2", "\[Rule]", 
      RowBox[{"45", "\[Degree]"}]}], "|>"}]}], ",", "\[IndentingNewLine]", 
   RowBox[{"\"\<RotationAnchorShift\>\"", "\[Rule]", 
    RowBox[{"{", 
     RowBox[{"0.5", ",", "0.5", ",", "0"}], "}"}]}]}], "\[IndentingNewLine]", 
  "]"}]}], "Input",
 CellChangeTimes->{{3.782474054993082*^9, 3.7824740761472*^9}, {
  3.78247414926828*^9, 3.782474149386018*^9}, {3.782475272055072*^9, 
  3.782475312900523*^9}, {3.7824753804392023`*^9, 3.782475386691334*^9}},
 CellLabel->"In[4]:=",
 CellID->2002752601,ExpressionUUID->"cc422371-e415-47c0-93a0-f1100ba3a41c"],

Cell[BoxData[
 GraphicsBox[
  {Opacity[1.], 
   {RGBColor[1, 0, 0], GeometricTransformationBox[
     InterpretationBox[PolygonBox[{{0., 0.}, {1., 0.}, {1., 1.}, {0., 1.}}],
      Parallelepiped[{0., 0.}, {{1., 0.}, {0., 1.}}]], {{{1., 0.}, {0., 
      1.}}, {0., 0.}}]}, 
   {RGBColor[0, 1, 0], GeometricTransformationBox[
     InterpretationBox[PolygonBox[{{0., 1.}, {1., 1.}, {1., 2.}, {0., 2.}}],
      Parallelepiped[{0., 1.}, {{1., 0.}, {0., 1.}}]], {{{
      0.7071067811865476, -0.7071067811865475}, {0.7071067811865475, 
      0.7071067811865476}}, {1.2071067811865475`, 0.08578643762690485}}]}, 
   {RGBColor[1, 0, 0], GeometricTransformationBox[
     InterpretationBox[PolygonBox[{{0., 2.}, {1., 2.}, {1., 3.}, {0., 3.}}],
      Parallelepiped[{0., 2.}, {{1., 0.}, {0., 1.}}]], {{{1., 0.}, {0., 
      1.}}, {0., 0.}}]}, 
   {RGBColor[0, 1, 0], GeometricTransformationBox[
     InterpretationBox[PolygonBox[{{1., 0.}, {2., 0.}, {2., 1.}, {1., 1.}}],
      Parallelepiped[{1., 0.}, {{1., 0.}, {0., 1.}}]], {{{
      0.7071067811865476, -0.7071067811865475}, {0.7071067811865475, 
      0.7071067811865476}}, {0.7928932188134523, -0.9142135623730949}}]}, 
   {RGBColor[1, 0, 0], GeometricTransformationBox[
     InterpretationBox[PolygonBox[{{1., 1.}, {2., 1.}, {2., 2.}, {1., 2.}}],
      Parallelepiped[{1., 1.}, {{1., 0.}, {0., 1.}}]], {{{1., 0.}, {0., 
      1.}}, {0., 0.}}]}, 
   {RGBColor[0, 1, 0], GeometricTransformationBox[
     InterpretationBox[PolygonBox[{{1., 2.}, {2., 2.}, {2., 3.}, {1., 3.}}],
      Parallelepiped[{1., 2.}, {{1., 0.}, {0., 1.}}]], {{{
      0.7071067811865476, -0.7071067811865475}, {0.7071067811865475, 
      0.7071067811865476}}, {2.207106781186547, -0.32842712474618985`}}]}, 
   {RGBColor[1, 0, 0], GeometricTransformationBox[
     InterpretationBox[PolygonBox[{{2., 0.}, {3., 0.}, {3., 1.}, {2., 1.}}],
      Parallelepiped[{2., 0.}, {{1., 0.}, {0., 1.}}]], {{{1., 0.}, {0., 
      1.}}, {0., 0.}}]}, 
   {RGBColor[0, 1, 0], GeometricTransformationBox[
     InterpretationBox[PolygonBox[{{2., 1.}, {3., 1.}, {3., 2.}, {2., 2.}}],
      Parallelepiped[{2., 1.}, {{1., 0.}, {0., 1.}}]], {{{
      0.7071067811865476, -0.7071067811865475}, {0.7071067811865475, 
      0.7071067811865476}}, {1.7928932188134523`, -1.3284271247461898`}}]}, 
   {RGBColor[1, 0, 0], GeometricTransformationBox[
     InterpretationBox[PolygonBox[{{2., 2.}, {3., 2.}, {3., 3.}, {2., 3.}}],
      Parallelepiped[{2., 2.}, {{1., 0.}, {0., 1.}}]], {{{1., 0.}, {0., 
      1.}}, {0., 0.}}]}},
  Frame->False]], "Output",
 CellChangeTimes->{{3.782474149964926*^9, 3.782474152997401*^9}, {
   3.7824753090070047`*^9, 3.782475323523148*^9}, 3.782475387518786*^9, 
   3.782476032432087*^9},
 CellLabel->"Out[5]=",
 CellID->788763676,ExpressionUUID->"b0fb644d-e602-476b-8316-d1df617908ca"]
}, Open  ]],

Cell[TextData[{
 "In order to recreate this as a \[OpenCurlyDoubleQuote]real structure\
\[CloseCurlyDoubleQuote] we use the same rotation options, just with a \
three-dimensional setting of the ",
 Cell[BoxData["\<\"RotationMap\"\>"], "InlineFormula",ExpressionUUID->
  "3555b054-ba89-401f-aab7-a371e0cb8c81"],
 " and a shift of the anchors that are half the blocks' lattice parameter \
(which are ",
 Cell[BoxData[
  FormBox[
   RowBox[{"5.0", " ", "\[CapitalARing]"}], TraditionalForm]], "InlineMath",
  ExpressionUUID->"5d1f86ee-e3e0-4f7e-8c24-9533df331f48"],
 "):"
}], "ExampleText",
 CellChangeTimes->{{3.7824805166404953`*^9, 3.7824805786986237`*^9}, {
  3.782480658599147*^9, 3.7824807389698544`*^9}},
 CellID->675834675,ExpressionUUID->"3a2e684c-a28f-4038-9cc1-559419bc9db6"],

Cell[CellGroupData[{

Cell[BoxData[{
 RowBox[{
  RowBox[{"SynthesiseStructure", "[", 
   RowBox[{"domain", ",", "\"\<Demo\>\"", ",", 
    RowBox[{"<|", 
     RowBox[{
      RowBox[{"1", "\[Rule]", "blockAu"}], ",", 
      RowBox[{"2", "\[Rule]", "blockAg"}]}], "|>"}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"\"\<RotationAnchorReference\>\"", "\[Rule]", "\"\<Unit\>\""}], 
    ",", "\[IndentingNewLine]", 
    RowBox[{"\"\<RotationMap\>\"", "\[Rule]", 
     RowBox[{"<|", 
      RowBox[{"2", "\[Rule]", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", 
         RowBox[{"45", "\[Degree]"}]}], "}"}]}], "|>"}]}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"\"\<RotationAnchorShift\>\"", "\[Rule]", 
     RowBox[{"{", 
      RowBox[{"2.5", ",", "2.5", ",", "0"}], "}"}]}], ",", 
    "\[IndentingNewLine]", 
    RowBox[{"\"\<UsePlacementBuffer\>\"", "\[Rule]", "True"}]}], 
   "\[IndentingNewLine]", "]"}], ";"}], "\[IndentingNewLine]", 
 RowBox[{"CrystalPlot", "[", 
  RowBox[{"\"\<Demo\>\"", ",", 
   RowBox[{"ViewPoint", "\[Rule]", "Above"}]}], "]"}]}], "Input",
 CellChangeTimes->{{3.782474163014351*^9, 3.782474198672906*^9}, {
  3.782474243177321*^9, 3.782474250471504*^9}, {3.782474293530115*^9, 
  3.782474297462731*^9}, {3.782474337592525*^9, 3.782474344037818*^9}, {
  3.7824745057024517`*^9, 3.7824745912167053`*^9}, {3.782475074365868*^9, 
  3.782475092461025*^9}, {3.782475194514868*^9, 3.782475259480221*^9}, {
  3.7824753285923443`*^9, 3.782475356435774*^9}, {3.782475397167507*^9, 
  3.7824755034807863`*^9}, {3.78247557291504*^9, 3.782475578601182*^9}, {
  3.782475716767268*^9, 3.782475790078021*^9}, {3.782475826755636*^9, 
  3.782475929151185*^9}},
 CellLabel->"In[6]:=",
 CellID->631003679,ExpressionUUID->"c9db8fb2-c7d3-4bca-a679-a22ae30581f8"],

Cell[BoxData[
 Graphics3DBox[{
   {RGBColor[1, 0, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {5., 0., 0.}}]]}, 
   {RGBColor[0, 1, 0], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 5., 0.}}]]}, 
   {RGBColor[0, 0, 1], Arrow3DBox[Line3DBox[{{0, 0, 0}, {0., 0., 5.}}]]}, 
   {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {5., 5., 0.}}]}, 
   {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 5., 0.}}]}, 
   {GrayLevel[0], Line3DBox[{{5., 0., 0.}, {5., 0., 5.}}]}, 
   {GrayLevel[0], Line3DBox[{{0., 5., 0.}, {0., 5., 5.}}]}, 
   {GrayLevel[0], Line3DBox[{{5., 5., 0.}, {5., 5., 5.}}]}, 
   {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {5., 0., 5.}}]}, 
   {GrayLevel[0], Line3DBox[{{0., 0., 5.}, {0., 5., 5.}}]}, 
   {GrayLevel[0], Line3DBox[{{0., 5., 5.}, {5., 5., 5.}}]}, 
   {GrayLevel[0], Line3DBox[{{5., 0., 5.}, {5., 5., 5.}}]}, 
   {RGBColor[1., 0.819608, 0.137255], SphereBox[CompressedData["
1:eJyV0bEJgEAMRuFDV7gFBAsrKxs7Z3AEwdr9O23SfBA9A3Lk+fxzxOG49rMr
pUzP05e/Vbf3Xu7Zmpd99/V+SeYE118TP7hzzJfrmy+PfuSMkuvPiR+80psv
1zdfnu0lqnVf+l97jGrdr372X72vXN/5cu9jvlzffHndbs4IIwc=
     "], 1.74]}, 
   {RGBColor[0.752941, 0.752941, 0.752941], SphereBox[CompressedData["
1:eJxTTMoPSmViYGBQAGJmIP73HwSYHQJsf9Sfe6vowAAF2MVFHBpE7Rh6Jn7Y
D+FrwtVjFxdxSGjlZ0hWkXBAV49dXARKszhEPGQ+IMFpAFePXRymXtOhBsV+
GEAXF4H7hwVqHkwldnERNPsQ6rGLI9yTiOI/hHtQxUUcGKHiK+T+2D//ZgRX
j11cxCEIOT4azODqsYujuR9JPXZxEQcmqL0QeSu4euziInD96OkHu7gImn8Q
6QG7uAjcPnBy/K+B5n50cYR7wrGlHwxxEQcA1YCWJw==
     "], 1.65]}},
  AlignmentPoint->Center,
  AspectRatio->Automatic,
  Axes->False,
  AxesEdge->Automatic,
  AxesLabel->None,
  AxesOrigin->Automatic,
  AxesStyle->{},
  Background->None,
  BaseStyle->{},
  BaselinePosition->Automatic,
  BoxRatios->Automatic,
  BoxStyle->{},
  Boxed->False,
  ClipPlanes->None,
  ClipPlanesStyle->Automatic,
  ColorOutput->Automatic,
  ContentSelectable->Automatic,
  ControllerLinking->Automatic,
  ControllerMethod->Automatic,
  ControllerPath->Automatic,
  CoordinatesToolOptions:>Automatic,
  DisplayFunction->Identity,
  Epilog->{},
  FaceGrids->None,
  FaceGridsStyle->{},
  FormatType->TraditionalForm,
  ImageMargins->0.,
  ImagePadding->All,
  ImageSize->Automatic,
  ImageSizeRaw->Automatic,
  LabelStyle->{},
  Lighting->"Neutral",
  Method->Automatic,
  PlotLabel->None,
  PlotRange->All,
  PlotRangePadding->Automatic,
  PlotRegion->Automatic,
  PreserveImageOptions->Automatic,
  Prolog->{},
  RotationAction->"Fit",
  SphericalRegion->True,
  Ticks->Automatic,
  TicksStyle->{},
  TouchscreenAutoZoom->False,
  ViewAngle->Automatic,
  ViewCenter->Automatic,
  ViewMatrix->Automatic,
  ViewPoint->Above,
  ViewProjection->Automatic,
  ViewRange->All,
  ViewVector->Automatic,
  ViewVertical->{0, 0, 1}]], "Output",
 CellChangeTimes->{
  3.782474198966319*^9, {3.782474240308239*^9, 3.782474250747342*^9}, {
   3.782474294529821*^9, 3.782474297701824*^9}, {3.782474340058342*^9, 
   3.782474344514625*^9}, {3.78247450810181*^9, 3.78247453838239*^9}, 
   3.782474583320384*^9, 3.782474613731862*^9, {3.782474930135919*^9, 
   3.782474954169963*^9}, 3.782474987533256*^9, {3.782475030095052*^9, 
   3.7824750428366537`*^9}, {3.7824750753453712`*^9, 3.782475092668832*^9}, {
   3.782475201007205*^9, 3.782475259712977*^9}, {3.782475343041307*^9, 
   3.782475356802876*^9}, {3.7824754035813828`*^9, 3.7824755039922333`*^9}, 
   3.782475580026503*^9, {3.782475705459867*^9, 3.7824757660766783`*^9}, {
   3.782475821792498*^9, 3.782475870342614*^9}, {3.782475906045589*^9, 
   3.7824759296732817`*^9}, {3.782476000162409*^9, 3.7824760338695517`*^9}},
 CellLabel->"Out[7]=",
 CellID->1159037291,ExpressionUUID->"e6d396c1-d002-482b-a041-6a46571c2bb3"]
}, Open  ]],

Cell[TextData[{
 "Restoring ",
 Cell[BoxData[
  ButtonBox["$CrystalData",
   BaseStyle->"Link",
   ButtonData->"paclet:MaXrd/ref/$CrystalData"]], "InlineFormula",
  ExpressionUUID->"5ff4ae07-2a3f-40f7-a434-8e912b3ef2d6"],
 ":"
}], "ExampleText",
 CellChangeTimes->{{3.771135573094782*^9, 3.77113559261269*^9}},
 CellID->2008103444,ExpressionUUID->"3a828774-145b-432d-b187-caa9aac7f659"],

Cell[BoxData[
 RowBox[{
  RowBox[{"$CrystalData", "=", 
   RowBox[{"Import", "@", 
    RowBox[{"FileNameJoin", "[", 
     RowBox[{"{", 
      RowBox[{
      "$MaXrdPath", ",", "\"\<Core\>\"", ",", "\"\<Data\>\"", ",", 
       "\"\<CrystalData.m\>\""}], "}"}], "]"}]}]}], ";"}]], "Input",
 CellChangeTimes->{{3.7711355945793324`*^9, 3.771135631844901*^9}},
 CellLabel->"In[8]:=",
 CellID->341587056,ExpressionUUID->"df053f67-7794-4788-9911-c89fe6b8da90"]
}, Open  ]],

Cell[BoxData[
 InterpretationBox[Cell[
  "XXXX", "ExampleSubsection",ExpressionUUID->
   "5de6a9d5-1cde-4558-a494-bc8f74826169"],
  $Line = 0; Null]], "ExampleSubsection",
 CellID->1295379749,ExpressionUUID->"e9932f02-34ba-4fc4-b0a8-7572d0b822a7"]
}, Open  ]],

Cell[BoxData[
 InterpretationBox[Cell[
  "Applications", "ExampleSection",ExpressionUUID->
   "4e1c0a1e-3f7d-4c9b-9456-1b23c35efe82"],
  $Line = 0; Null]], "ExampleSection",
 CellID->258228157,ExpressionUUID->"34ede0ce-2c62-4ab9-8e0b-d2a08e869bd1"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Properties & Relations", "ExampleSection",ExpressionUUID->
   "8b5c6c19-f698-4378-a9d6-d4cab699253c"],
  $Line = 0; Null]], "ExampleSection",
 CellID->2123667759,ExpressionUUID->"fed10896-5838-4b0d-b718-c8809c1b6256"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Possible Issues", "ExampleSection",ExpressionUUID->
   "422f43a6-41d3-42c0-b646-d660e7fdb195"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1305812373,ExpressionUUID->"37af1b90-0e05-48de-b265-961bcbf8fd0e"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Interactive Examples", "ExampleSection",ExpressionUUID->
   "9012cad2-447a-4c5c-ae29-c52560a7ea7f"],
  $Line = 0; Null]], "ExampleSection",
 CellID->1653164318,ExpressionUUID->"6b511560-ed89-4e8a-af4b-b24f31aba3c8"],

Cell[BoxData[
 InterpretationBox[Cell[
  "Neat Examples", "ExampleSection",ExpressionUUID->
   "fe658808-5b31-4646-9ea7-1d6d2f5da673"],
  $Line = 0; Null]], "ExampleSection",
 CellID->589267740,ExpressionUUID->"0777c10a-a047-4284-a5d1-bc855e0b8e9f"],

Cell[CellGroupData[{

Cell[BoxData[
 InterpretationBox[Cell[TextData[{
   StyleBox["Mathematica",
    FontSlant->"Italic"],
   " code"
  }], "ExampleSection",ExpressionUUID->"74cff911-f68e-4b7d-b24b-22596c9eb6ef"],
  $Line = 0; Null]], "ExampleSection",
 CellChangeTimes->{{3.77097965676189*^9, 3.7709796645027027`*^9}},
 CellID->1903379581,ExpressionUUID->"e2d20453-56a3-4e14-96c3-d52e1313097f"],

Cell[BoxData[{
 RowBox[{
  RowBox[{
   RowBox[{"SynthesiseStructure", "::", "SizeError"}], "=", 
   "\"\<Size discrepancy in domain input.\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"SynthesiseStructure", "::", "DifferentBlockSizes"}], "=", 
   "\"\<The blocks must have the same size.\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"SynthesiseStructure", "::", "InvalidOutputSize"}], "=", 
   "\"\<Output size must be a list of three positive integers.\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"SynthesiseStructure", "::", "IncompatibleOutputSize"}], "=", 
   "\"\<Output size must be compatible with block sizes.\>\""}], 
  ";"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"SynthesiseStructure", "::", "InvalidSelectionMethod"}], "=", 
    "\"\<\[LeftGuillemet]`1`\[RightGuillemet] is not a valid selection \
method.\>\""}], ";"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{
    RowBox[{"Options", "@", "SynthesiseStructure"}], "=", 
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{
      "\"\<RotationAnchorReference\>\"", "\[Rule]", 
       "\"\<DomainCentroid\>\""}], ",", "\[IndentingNewLine]", 
      RowBox[{"\"\<RotationAnchorShift\>\"", "\[Rule]", 
       RowBox[{"{", 
        RowBox[{"0", ",", "0", ",", "0"}], "}"}]}], ",", 
      "\[IndentingNewLine]", 
      RowBox[{"\"\<RotationAxes\>\"", "\[Rule]", 
       RowBox[{"IdentityMatrix", "[", "3", "]"}]}], ",", 
      "\[IndentingNewLine]", 
      RowBox[{"\"\<RotationMap\>\"", "\[Rule]", 
       RowBox[{"<|", "|>"}]}], ",", "\[IndentingNewLine]", 
      RowBox[{"\"\<SelectionMethod\>\"", "\[Rule]", "\"\<Sequential\>\""}], 
      ",", "\[IndentingNewLine]", 
      RowBox[{"\"\<UsePlacementBuffer\>\"", "\[Rule]", "False"}], ",", 
      "\[IndentingNewLine]", 
      RowBox[{"(*", " ", 
       RowBox[{"Options", " ", 
        RowBox[{"from", " ", "'"}], 
        RowBox[{"EmbedStructure", "'"}]}], " ", "*)"}], "\[IndentingNewLine]", 
      RowBox[{"\"\<OverlapPrecedence\>\"", "\[Rule]", 
       RowBox[{"OptionValue", "[", "\[IndentingNewLine]", 
        RowBox[{"EmbedStructure", ",", "\"\<OverlapPrecedence\>\""}], "]"}]}],
       ",", "\[IndentingNewLine]", 
      RowBox[{"\"\<OverlapRadius\>\"", "\[Rule]", 
       RowBox[{"OptionValue", "[", "\[IndentingNewLine]", 
        RowBox[{"EmbedStructure", ",", "\"\<OverlapRadius\>\""}], "]"}]}]}], 
     "\[IndentingNewLine]", "}"}]}], ";"}], 
  "\[IndentingNewLine]"}], "\[IndentingNewLine]", 
 RowBox[{
  RowBox[{
   RowBox[{"SyntaxInformation", "@", "SynthesiseStructure"}], "=", 
   RowBox[{"{", "\[IndentingNewLine]", 
    RowBox[{"\"\<ArgumentsPattern\>\"", "\[Rule]", 
     RowBox[{"{", 
      RowBox[{"_", ",", "_", ",", "_.", ",", 
       RowBox[{"OptionsPattern", "[", "]"}]}], "}"}]}], "\[IndentingNewLine]",
     "}"}]}], ";"}]}], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.714926640095376*^9, 3.714926648623674*^9}, {
   3.7281068862853603`*^9, 3.728106924475239*^9}, {3.747569567860682*^9, 
   3.747569567914845*^9}, {3.747569839486174*^9, 3.747569852127593*^9}, {
   3.756710428101788*^9, 3.756710432840755*^9}, {3.7567104759439573`*^9, 
   3.756710476208014*^9}, {3.76094984995916*^9, 3.760949866421854*^9}, {
   3.762482676390929*^9, 3.762482706347602*^9}, {3.762487787402885*^9, 
   3.762487787935628*^9}, {3.7704597473877983`*^9, 3.77045978202227*^9}, {
   3.770459933601384*^9, 3.770459936167313*^9}, {3.7704666896136217`*^9, 
   3.770466697612974*^9}, {3.7706146521036377`*^9, 3.770614679663534*^9}, {
   3.770616146185195*^9, 3.7706161787997923`*^9}, 3.7706163538198566`*^9, {
   3.770625540633625*^9, 3.770625595637392*^9}, {3.7709815083625593`*^9, 
   3.7709815150338287`*^9}, 3.770981562273196*^9, {3.770981597932929*^9, 
   3.770981604782627*^9}, {3.7709821387767553`*^9, 3.7709821576086407`*^9}, {
   3.770982202460527*^9, 3.770982202767514*^9}, {3.77098268625275*^9, 
   3.770982724146615*^9}, {3.770982893187273*^9, 3.770982895507979*^9}, {
   3.770982949179625*^9, 3.770982949860483*^9}, {3.7711389640232897`*^9, 
   3.771138996795042*^9}, {3.771139678009183*^9, 3.771139681253922*^9}, {
   3.771139711505148*^9, 3.771139718197137*^9}, {3.771140266242723*^9, 
   3.7711402801712523`*^9}, {3.771234573160223*^9, 3.771234576247919*^9}, {
   3.7790453782528954`*^9, 3.779045425619176*^9}, {3.7790763711444902`*^9, 
   3.779076372527687*^9}, {3.779080400658866*^9, 3.779080417177166*^9}, {
   3.779093001463686*^9, 3.779093012877165*^9}, {3.779132451747096*^9, 
   3.779132451903741*^9}, {3.78167905421262*^9, 3.7816790591864758`*^9}, {
   3.781858765887219*^9, 3.781858768500503*^9}, {3.781858893507841*^9, 
   3.7818589180501623`*^9}, 3.781858968592648*^9, {3.781859020439496*^9, 
   3.781859042239254*^9}, 3.7818594429947987`*^9, {3.781864037272621*^9, 
   3.781864044712007*^9}, {3.781969992136195*^9, 3.781969995797161*^9}, {
   3.78202897837047*^9, 3.782028979881863*^9}, {3.782040949317198*^9, 
   3.782040958595056*^9}, 3.782047378521851*^9, {3.782047741561439*^9, 
   3.7820477894554*^9}, {3.782050918112599*^9, 3.782050918255136*^9}, {
   3.782051029102474*^9, 3.7820510312687397`*^9}},
 CellLabel->"In[896]:=",
 CellID->721711247,ExpressionUUID->"2959d949-cba1-408c-aa9a-1cdc531b6aff"],

Cell[BoxData[
 RowBox[{
  RowBox[{"SynthesiseStructure", "[", 
   RowBox[{
   "blocks_List", ",", "outputSize_List", ",", "outputName_String", ",", 
    RowBox[{"OptionsPattern", "[", "]"}]}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{"blockSizes", ",", 
      RowBox[{"selectionMethod", "=", 
       RowBox[{"OptionValue", "[", "\"\<SelectionMethod\>\"", "]"}]}], ",", 
      "\[IndentingNewLine]", "insertionCoordinates", ",", "b", ",", 
      "numberOfBlocks", ",", "blocksToUse", ",", "buildTasks"}], 
     "\[IndentingNewLine]", "}"}], ",", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Checking", " ", "input"}], " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"Scan", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"InputCheck", "[", 
         RowBox[{"\"\<CrystalQ\>\"", ",", "#"}], "]"}], "&"}], ",", 
       "blocks"}], "]"}], ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"MemberQ", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"\"\<Random\>\"", ",", "\"\<Sequential\>\""}], "}"}], ",", 
          "selectionMethod"}], "]"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{
          RowBox[{"SynthesiseStructure", "::", "InvalidSelectionMethod"}], 
          ",", "selectionMethod"}], "]"}], ";", "\[IndentingNewLine]", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
      "Checking", " ", "if", " ", "all", " ", "blocks", " ", "have", " ", 
       "same", " ", "size"}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"blockSizes", "=", 
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"$CrystalData", "[", 
           RowBox[{"#", ",", "\"\<Notes\>\"", ",", "\"\<StructureSize\>\""}], 
           "]"}], "/.", 
          RowBox[{"_Missing", "\[Rule]", 
           RowBox[{"{", 
            RowBox[{"1", ",", "1", ",", "1"}], "}"}]}]}], ")"}], "&"}], "/@", 
       "blocks"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"SameQ", "@@", "blockSizes"}]}], ",", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"SynthesiseStructure", "::", "DifferentBlockSizes"}], "]"}], 
        ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"blockSizes", "=", 
      RowBox[{
      "blockSizes", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], 
     ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Checking", " ", 
       RowBox[{"if", " ", "'"}], 
       RowBox[{"outputSize", "'"}], " ", "is", " ", "valid"}], " ", "*)"}], 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"Length", "@", "outputSize"}], "\[NotEqual]", "3"}], ")"}], 
        "||", 
        RowBox[{"(", 
         RowBox[{"AnyTrue", "[", 
          RowBox[{"outputSize", ",", 
           RowBox[{
            RowBox[{
             RowBox[{"Positive", "[", "#", "]"}], "\[Nand]", 
             RowBox[{"IntegerQ", "[", "#", "]"}]}], "&"}]}], "]"}], ")"}]}], 
       ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"SynthesiseStructure", "::", "InvalidOutputSize"}], "]"}], 
        ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"Total", "@", 
         RowBox[{"MapThread", "[", 
          RowBox[{"Mod", ",", 
           RowBox[{"{", 
            RowBox[{"outputSize", ",", "blockSizes"}], "}"}]}], "]"}]}], "=!=",
         "0"}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"SynthesiseStructure", "::", "IncompatibleOutputSize"}], 
         "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{"Preparing", " ", "placement", " ", "of", " ", "blocks"}], " ", 
      "*)"}], "\[IndentingNewLine]", 
     RowBox[{"b", "=", 
      RowBox[{"If", "[", 
       RowBox[{
        RowBox[{"TrueQ", "@", 
         RowBox[{"OptionValue", "[", "\"\<UsePlacementBuffer\>\"", "]"}]}], 
        ",", "2", ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"insertionCoordinates", "=", 
      RowBox[{"Flatten", "[", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"i", ",", "j", ",", "k"}], "}"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"{", 
           RowBox[{"i", ",", "0", ",", 
            RowBox[{
             RowBox[{"b", "*", 
              RowBox[{
              "outputSize", "\[LeftDoubleBracket]", "1", 
               "\[RightDoubleBracket]"}]}], "-", "1"}], ",", 
            RowBox[{"b", "*", 
             RowBox[{
             "blockSizes", "\[LeftDoubleBracket]", "1", 
              "\[RightDoubleBracket]"}]}]}], "}"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"{", 
           RowBox[{"j", ",", "0", ",", 
            RowBox[{
             RowBox[{"b", "*", 
              RowBox[{
              "outputSize", "\[LeftDoubleBracket]", "2", 
               "\[RightDoubleBracket]"}]}], "-", "1"}], ",", 
            RowBox[{"b", "*", 
             RowBox[{
             "blockSizes", "\[LeftDoubleBracket]", "2", 
              "\[RightDoubleBracket]"}]}]}], "}"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"{", 
           RowBox[{"k", ",", "0", ",", 
            RowBox[{
             RowBox[{"b", "*", 
              RowBox[{
              "outputSize", "\[LeftDoubleBracket]", "3", 
               "\[RightDoubleBracket]"}]}], "-", "1"}], ",", 
            RowBox[{"b", "*", 
             RowBox[{
             "blockSizes", "\[LeftDoubleBracket]", "3", 
              "\[RightDoubleBracket]"}]}]}], "}"}]}], "\[IndentingNewLine]", 
         "]"}], ",", "2"}], "]"}]}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"numberOfBlocks", "=", 
      RowBox[{"Times", "@@", 
       RowBox[{"MapThread", "[", 
        RowBox[{"Divide", ",", 
         RowBox[{"{", 
          RowBox[{"outputSize", ",", "blockSizes"}], "}"}]}], "]"}]}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"blocksToUse", "=", 
      RowBox[{
       RowBox[{"Flatten", "[", 
        RowBox[{"ConstantArray", "[", 
         RowBox[{"blocks", ",", "\[IndentingNewLine]", 
          RowBox[{"\[LeftCeiling]", 
           RowBox[{"numberOfBlocks", "/", 
            RowBox[{"Length", "@", "blocks"}]}], "\[RightCeiling]"}]}], "]"}],
         "]"}], "\[LeftDoubleBracket]", 
       RowBox[{";;", "numberOfBlocks"}], "\[RightDoubleBracket]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"selectionMethod", "===", "\"\<Random\>\""}], ",", 
       "\[IndentingNewLine]", 
       RowBox[{"blocksToUse", "=", 
        RowBox[{"RandomSample", "@", "blocksToUse"}]}]}], "]"}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", "Assembling", " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"buildTasks", "=", 
      RowBox[{"Transpose", "[", 
       RowBox[{"{", 
        RowBox[{"blocksToUse", ",", "insertionCoordinates"}], "}"}], "]"}]}], 
     ";", "\[IndentingNewLine]", 
     RowBox[{"AppendTo", "[", 
      RowBox[{"$CrystalData", ",", 
       RowBox[{"outputName", "\[Rule]", 
        RowBox[{"$CrystalData", "[", 
         RowBox[{"buildTasks", "\[LeftDoubleBracket]", 
          RowBox[{"1", ",", "1"}], "\[RightDoubleBracket]"}], "]"}]}]}], 
      "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"Scan", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"EmbedStructure", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{
           "#", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}], "}"}],
           ",", 
          RowBox[{"{", 
           RowBox[{
           "#", "\[LeftDoubleBracket]", "2", "\[RightDoubleBracket]"}], "}"}],
           ",", "outputName", ",", "\[IndentingNewLine]", 
          RowBox[{"\"\<MatchHostSize\>\"", "\[Rule]", "False"}], ",", 
          RowBox[{"\"\<ShowProgress\>\"", "\[Rule]", "False"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"\"\<OverlapPrecedence\>\"", "\[Rule]", 
           RowBox[{"OptionValue", "[", "\"\<OverlapPrecedence\>\"", "]"}]}], 
          ",", "\[IndentingNewLine]", 
          RowBox[{"\"\<OverlapRadius\>\"", "\[Rule]", 
           RowBox[{"OptionValue", "[", "\"\<OverlapRadius\>\"", "]"}]}]}], 
         "\[IndentingNewLine]", "]"}], "&"}], ",", "\[IndentingNewLine]", 
       RowBox[{"buildTasks", "\[LeftDoubleBracket]", 
        RowBox[{"2", ";;"}], "\[RightDoubleBracket]"}]}], "]"}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"$CrystalData", "[", 
       RowBox[{
       "outputName", ",", "\"\<Notes\>\"", ",", "\"\<StructureSize\>\""}], 
       "]"}], "=", 
      RowBox[{
       RowBox[{"Last", "@", "insertionCoordinates"}], "+", "blockSizes"}]}], 
     ";", "\[IndentingNewLine]", "\[IndentingNewLine]", "outputName"}]}], 
   "\[IndentingNewLine]", "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.682241896337058*^9, 3.6822419009563293`*^9}, {
   3.6822421030731297`*^9, 3.682242104796829*^9}, {3.682242247634622*^9, 
   3.682242293608499*^9}, {3.6822423242774973`*^9, 3.6822424939877663`*^9}, {
   3.682242524871819*^9, 3.682242610095582*^9}, {3.6822426631468697`*^9, 
   3.682242849688897*^9}, {3.682242985123843*^9, 3.682243000592795*^9}, {
   3.682243032221999*^9, 3.682243042906146*^9}, {3.682243121993319*^9, 
   3.682243187533738*^9}, {3.6822433171568623`*^9, 3.682243318068676*^9}, {
   3.6822433533711243`*^9, 3.68224345949043*^9}, {3.682243499999116*^9, 
   3.682243500570818*^9}, {3.682243559642397*^9, 3.682243568303032*^9}, {
   3.682243656585619*^9, 3.682243807041559*^9}, {3.682243892622666*^9, 
   3.682243979341007*^9}, {3.682244011749632*^9, 3.682244092729911*^9}, {
   3.6822441869470167`*^9, 3.682244221175058*^9}, {3.68224427065597*^9, 
   3.682244283409008*^9}, {3.6822443160128517`*^9, 3.682244326447394*^9}, {
   3.682244392020493*^9, 3.682244400571671*^9}, {3.682244596208706*^9, 
   3.682244803339835*^9}, {3.682244951115906*^9, 3.6822449654470167`*^9}, {
   3.682247256239483*^9, 3.682247304444981*^9}, {3.682247343926553*^9, 
   3.682247361035624*^9}, {3.682247395780785*^9, 3.6822474984407682`*^9}, {
   3.6822475305652437`*^9, 3.682247636381772*^9}, {3.6822476807262373`*^9, 
   3.682247690229601*^9}, {3.682247723533629*^9, 3.682247825538166*^9}, {
   3.682247866195016*^9, 3.6822478768890457`*^9}, {3.682247927112714*^9, 
   3.682248080675892*^9}, {3.682248357004342*^9, 3.682248375626561*^9}, {
   3.6822486441315317`*^9, 3.682248669634107*^9}, 3.68224956936229*^9, 
   3.682262332986014*^9, {3.6822623719028997`*^9, 3.68226237223594*^9}, {
   3.682312281830681*^9, 3.6823123030407467`*^9}, {3.682323578349629*^9, 
   3.682323592418137*^9}, {3.6823237158461313`*^9, 3.682323721213748*^9}, 
   3.682327662602072*^9, {3.6824963506791697`*^9, 3.6824963547512217`*^9}, {
   3.682496400113083*^9, 3.682496493228437*^9}, 3.682677149488262*^9, {
   3.685082142306231*^9, 3.6850821530756807`*^9}, 3.685084035768195*^9, {
   3.68655238046353*^9, 3.686552426771611*^9}, {3.6865525950866337`*^9, 
   3.686552685595372*^9}, {3.686635545814003*^9, 3.686635612323032*^9}, {
   3.686645933806924*^9, 3.686646007894505*^9}, {3.686646064248117*^9, 
   3.68664607682882*^9}, {3.686655195368894*^9, 3.6866552343027163`*^9}, {
   3.6866553151103287`*^9, 3.686655409251244*^9}, {3.6866554490764103`*^9, 
   3.686655514039054*^9}, {3.686655580018355*^9, 3.686655635546473*^9}, {
   3.686655748745368*^9, 3.686655776590246*^9}, {3.714925556554666*^9, 
   3.714925578583651*^9}, {3.7149256217212152`*^9, 3.714925689133297*^9}, {
   3.7149258652268667`*^9, 3.714925953487383*^9}, {3.71492600096751*^9, 
   3.714926119019596*^9}, {3.714926175338132*^9, 3.714926196305581*^9}, 
   3.7149262352489967`*^9, {3.714926307824396*^9, 3.7149264095004387`*^9}, {
   3.714926450015284*^9, 3.7149265295624437`*^9}, {3.7149265755610447`*^9, 
   3.714926579417263*^9}, {3.714926655695353*^9, 3.714926765295703*^9}, {
   3.714927064423978*^9, 3.714927159155733*^9}, {3.7149272069557753`*^9, 
   3.7149276407442627`*^9}, {3.714927818589819*^9, 3.714927894002508*^9}, {
   3.715014199691877*^9, 3.7150142148573313`*^9}, {3.715064942408142*^9, 
   3.715064943132308*^9}, {3.7153145414034758`*^9, 3.7153145467616673`*^9}, 
   3.715327856633502*^9, {3.7154051731829433`*^9, 3.7154051929183903`*^9}, {
   3.7154052332773438`*^9, 3.715405253294734*^9}, {3.715405360310897*^9, 
   3.7154054069587708`*^9}, {3.717222403726162*^9, 3.717222415552843*^9}, {
   3.717222474077138*^9, 3.717222480379856*^9}, {3.7172225774835167`*^9, 
   3.717222584585285*^9}, {3.717740920496456*^9, 3.71774092050616*^9}, {
   3.7220727239925957`*^9, 3.722072731381322*^9}, {3.722072809534255*^9, 
   3.722072832036512*^9}, {3.722072863802107*^9, 3.722072898519074*^9}, 
   3.726561391058339*^9, 3.727675293483314*^9, 3.727676783958682*^9, {
   3.728106031257224*^9, 3.7281060589380007`*^9}, {3.728106180011772*^9, 
   3.728106202173979*^9}, {3.728106287634863*^9, 3.728106301113369*^9}, {
   3.7281063321779118`*^9, 3.728106374799776*^9}, {3.7281065875793667`*^9, 
   3.728106596424721*^9}, {3.728106935268379*^9, 3.728106947051586*^9}, {
   3.728107085050242*^9, 3.728107225807564*^9}, {3.7281087296199503`*^9, 
   3.7281087417638607`*^9}, {3.728108952031921*^9, 3.728108953406122*^9}, 
   3.728109068830366*^9, {3.728109140732355*^9, 3.728109162684065*^9}, 
   3.7281092259390078`*^9, 3.737968467010312*^9, {3.7455680832964697`*^9, 
   3.745568119889543*^9}, {3.747569432494769*^9, 3.747569442874075*^9}, {
   3.74756949426586*^9, 3.747569500574552*^9}, {3.7475695377399282`*^9, 
   3.7475695465343924`*^9}, {3.7475699175021257`*^9, 3.747569978808453*^9}, {
   3.747570081604307*^9, 3.7475700987875013`*^9}, {3.747570851329288*^9, 
   3.747570860993803*^9}, {3.747570941533657*^9, 3.747570947293482*^9}, {
   3.747570979528742*^9, 3.747570979833435*^9}, {3.7475710460233097`*^9, 
   3.747571047925109*^9}, {3.747571084476077*^9, 3.747571086328722*^9}, {
   3.747571371903867*^9, 3.7475713729193487`*^9}, {3.747571561267179*^9, 
   3.747571562589777*^9}, {3.747572757880087*^9, 3.747572827753377*^9}, {
   3.747572862364382*^9, 3.747572879792859*^9}, {3.759519240146062*^9, 
   3.759519241328768*^9}, {3.7609498833793907`*^9, 3.76094989465484*^9}, {
   3.760985435505022*^9, 3.760985472615333*^9}, {3.761044721985759*^9, 
   3.7610447510077763`*^9}, {3.76104481522427*^9, 3.761044820157362*^9}, {
   3.76104492312523*^9, 3.76104492561299*^9}, {3.761045245983004*^9, 
   3.7610452901170893`*^9}, {3.761045366668412*^9, 3.761045378723996*^9}, {
   3.76124639061635*^9, 3.761246410336463*^9}, {3.761246468837595*^9, 
   3.761246470395545*^9}, {3.761246673739036*^9, 3.761246692142757*^9}, {
   3.761246756527741*^9, 3.761246831173169*^9}, {3.7612468685554323`*^9, 
   3.761246869827717*^9}, {3.7612469112124767`*^9, 3.761247051614558*^9}, {
   3.761247130070651*^9, 3.7612471343322563`*^9}, {3.761247190774343*^9, 
   3.761247226696908*^9}, {3.7612472608003902`*^9, 3.761247277095755*^9}, {
   3.7612473349529333`*^9, 3.761247347238995*^9}, {3.761247379119833*^9, 
   3.761247382237371*^9}, {3.761247500765175*^9, 3.761247531645439*^9}, {
   3.761247581531475*^9, 3.761247581665276*^9}, {3.76124761695472*^9, 
   3.761247712374427*^9}, {3.7612478775715733`*^9, 3.7612479024911127`*^9}, {
   3.761248027065674*^9, 3.7612480322790403`*^9}, {3.761248133261649*^9, 
   3.761248133821176*^9}, {3.762483079092483*^9, 3.762483079506445*^9}, {
   3.7624831653076982`*^9, 3.762483255155518*^9}, {3.762483448748105*^9, 
   3.762483459337694*^9}, {3.762484937954467*^9, 3.762484940528129*^9}, {
   3.762485478717585*^9, 3.762485519250081*^9}, {3.762485687785385*^9, 
   3.7624856997759*^9}, {3.762485763767784*^9, 3.7624857909884033`*^9}, {
   3.762485821389303*^9, 3.762485821901321*^9}, {3.762485865116181*^9, 
   3.76248587338028*^9}, {3.7624863035622253`*^9, 3.762486306889323*^9}, 
   3.7624864059931593`*^9, {3.762486451749774*^9, 3.762486453088664*^9}, {
   3.762486658295171*^9, 3.762486679735591*^9}, {3.762486914173285*^9, 
   3.762486976278838*^9}, {3.762487161588236*^9, 3.762487164161865*^9}, {
   3.762582301146738*^9, 3.762582302868475*^9}, {3.7625825420446243`*^9, 
   3.7625825422070208`*^9}, 3.7627930931894283`*^9, {3.763708440950055*^9, 
   3.763708444458358*^9}, {3.763795706131096*^9, 3.76379571208855*^9}, {
   3.763795807464473*^9, 3.763795831454368*^9}, {3.767429560180451*^9, 
   3.767429568446164*^9}, 3.770459731594898*^9, 3.77045978949087*^9, {
   3.7704599395191603`*^9, 3.770459942350878*^9}, {3.770460320192504*^9, 
   3.77046034225856*^9}, {3.770460744443172*^9, 3.770460790673462*^9}, {
   3.770462722783415*^9, 3.770462726522499*^9}, {3.770462870041655*^9, 
   3.770462893092216*^9}, {3.770463235775403*^9, 3.770463354490316*^9}, {
   3.770464803344589*^9, 3.7704649431280527`*^9}, {3.7704649769113207`*^9, 
   3.770464999988723*^9}, {3.7704651173818903`*^9, 3.770465120129682*^9}, {
   3.770465209927898*^9, 3.770465248981803*^9}, {3.7704652797498713`*^9, 
   3.770465415928398*^9}, {3.770465537455702*^9, 3.7704655656201468`*^9}, {
   3.770465641152669*^9, 3.770465644794568*^9}, {3.770466103176922*^9, 
   3.7704661912147818`*^9}, {3.7704662256847267`*^9, 3.770466424544442*^9}, {
   3.77046647576213*^9, 3.77046647708055*^9}, {3.7704666316257477`*^9, 
   3.770466663729806*^9}, {3.770569455033873*^9, 3.77056947362365*^9}, {
   3.770569965186427*^9, 3.770569975517632*^9}, {3.770613455882739*^9, 
   3.7706134615311623`*^9}, {3.7706144368471527`*^9, 3.770614455550804*^9}, {
   3.770614642444923*^9, 3.770614648346962*^9}, {3.7706146872518663`*^9, 
   3.770614706809328*^9}, {3.770615780706581*^9, 3.770615837875382*^9}, {
   3.770616067975326*^9, 3.770616161127016*^9}, {3.770616281788673*^9, 
   3.770616338679316*^9}, {3.770616527688498*^9, 3.770616578229919*^9}, {
   3.770617519347665*^9, 3.770617618502255*^9}, {3.770617715683031*^9, 
   3.770617752463728*^9}, {3.770618116138035*^9, 3.7706181296219597`*^9}, {
   3.770618161047112*^9, 3.770618195582769*^9}, {3.77061840921166*^9, 
   3.770618429996653*^9}, {3.7706188774711227`*^9, 3.770618880463545*^9}, {
   3.77061898635938*^9, 3.7706190570356627`*^9}, {3.7706191262161617`*^9, 
   3.770619143850253*^9}, {3.770620393630209*^9, 3.770620411752057*^9}, {
   3.7706205414208717`*^9, 3.770620595073638*^9}, {3.770620635698071*^9, 
   3.770620694965639*^9}, {3.770621285358365*^9, 3.7706213228053513`*^9}, {
   3.770621746590682*^9, 3.770621913127598*^9}, {3.7706250264948063`*^9, 
   3.7706250284066973`*^9}, {3.770625143129756*^9, 3.770625145122254*^9}, {
   3.770625196698786*^9, 3.770625226825259*^9}, {3.770625271797394*^9, 
   3.770625299948307*^9}, {3.770625340917306*^9, 3.7706253455065393`*^9}, {
   3.770625406711595*^9, 3.770625439263268*^9}, {3.770625484959586*^9, 
   3.7706254896638517`*^9}, {3.7706255324719887`*^9, 3.770625536534584*^9}, {
   3.770625601643078*^9, 3.770625660115859*^9}, {3.7706269748593388`*^9, 
   3.770626983180786*^9}, {3.770978748150028*^9, 3.770978844135597*^9}, {
   3.770981565611477*^9, 3.7709815849544163`*^9}, {3.771139352384213*^9, 
   3.771139435725677*^9}, {3.771141989286028*^9, 3.7711419920245047`*^9}, {
   3.771143011683299*^9, 3.771143018616251*^9}, {3.771143059910726*^9, 
   3.771143079334529*^9}, {3.771143112487186*^9, 3.771143118121806*^9}, {
   3.771143199801591*^9, 3.771143243956092*^9}, {3.771143352696369*^9, 
   3.7711433596184072`*^9}, {3.7742037135564613`*^9, 3.77420371903445*^9}, {
   3.7790460331623583`*^9, 3.779046038683786*^9}, {3.7790465556133432`*^9, 
   3.779046557949313*^9}, {3.7790466210358686`*^9, 3.779046629035347*^9}, {
   3.779076173162829*^9, 3.779076186108962*^9}, {3.779076376706129*^9, 
   3.7790764050721207`*^9}, {3.77907707240198*^9, 3.7790770727759323`*^9}, {
   3.779077116904462*^9, 3.7790771363191557`*^9}, {3.779077222030397*^9, 
   3.7790772451963463`*^9}, {3.779077278292552*^9, 3.779077293810793*^9}, {
   3.779077327756048*^9, 3.7790773461225557`*^9}, {3.779077400971356*^9, 
   3.779077401392465*^9}, {3.779078652836025*^9, 3.779078674233534*^9}, {
   3.7790789366442738`*^9, 3.77907905698431*^9}, {3.779080313783312*^9, 
   3.779080335990597*^9}, {3.7790804083883467`*^9, 3.779080409644253*^9}, {
   3.7790805587124434`*^9, 3.7790805924157047`*^9}, {3.779080668254277*^9, 
   3.779080748955948*^9}, 3.779080921313138*^9, {3.7790812563695297`*^9, 
   3.77908127282437*^9}, {3.779081329711192*^9, 3.779081329862935*^9}, {
   3.779081417629828*^9, 3.779081417885152*^9}, {3.7790815112035303`*^9, 
   3.779081567874836*^9}, {3.77908160297834*^9, 3.779081605410418*^9}, 
   3.779081642634364*^9, {3.779081818726289*^9, 3.779081818836506*^9}, {
   3.779081927827957*^9, 3.779081942290485*^9}, 3.7790819834125433`*^9, {
   3.779082026115778*^9, 3.7790820572111673`*^9}, {3.779082093109037*^9, 
   3.7790820934351387`*^9}, {3.779082505418542*^9, 3.779082582504551*^9}, {
   3.779082618161819*^9, 3.779082631974813*^9}, {3.7790833281717787`*^9, 
   3.7790833468169813`*^9}, {3.77908339321735*^9, 3.779083393359188*^9}, {
   3.779092931617548*^9, 3.779092941695651*^9}, 3.779092984373472*^9, 
   3.779093025471065*^9, {3.779093233015196*^9, 3.779093283089419*^9}, {
   3.779093347114683*^9, 3.779093358570322*^9}, {3.779093403195031*^9, 
   3.7790934294666843`*^9}, {3.779093483226296*^9, 3.779093671972971*^9}, {
   3.7790938415876703`*^9, 3.779093852432088*^9}, {3.7790943233708687`*^9, 
   3.77909436834396*^9}, {3.779132230691679*^9, 3.779132232130753*^9}, {
   3.7791322913529873`*^9, 3.779132328976726*^9}, {3.77913238294314*^9, 
   3.7791323831025457`*^9}, {3.779132416197893*^9, 3.779132481875678*^9}, {
   3.77913259690576*^9, 3.7791325984885693`*^9}, {3.779132633232272*^9, 
   3.7791327488973618`*^9}, {3.7791328356007566`*^9, 3.779132910565886*^9}, {
   3.779133291303643*^9, 3.77913350030802*^9}, {3.779133718247943*^9, 
   3.779133783523141*^9}, {3.779133814469346*^9, 3.779133815579176*^9}, {
   3.7791338790756273`*^9, 3.779133927424109*^9}, {3.779134513294778*^9, 
   3.779134564659233*^9}, {3.779134801244445*^9, 3.7791348453220997`*^9}, {
   3.7794598997260113`*^9, 3.779459946548224*^9}, {3.779459993534259*^9, 
   3.779460003612535*^9}, {3.77946003619566*^9, 3.7794600405698*^9}, {
   3.779460177055881*^9, 3.7794601841982183`*^9}, {3.779465818564105*^9, 
   3.779465837840556*^9}, {3.77946587589717*^9, 3.779465898190446*^9}, {
   3.779465943255336*^9, 3.779466009822507*^9}, {3.77946625854605*^9, 
   3.779466264350567*^9}, {3.7794707100815363`*^9, 3.779470791459454*^9}, {
   3.7794708372044983`*^9, 3.7794708430662127`*^9}, {3.7794708736280003`*^9, 
   3.779470889041346*^9}, {3.779471386472715*^9, 3.779471387758445*^9}, {
   3.7794727024761457`*^9, 3.779472704537242*^9}, {3.7794729380386343`*^9, 
   3.779472947702175*^9}, {3.779473633377185*^9, 3.7794736351008883`*^9}, {
   3.779475306395953*^9, 3.779475308136442*^9}, {3.7795148511524153`*^9, 
   3.7795148554943247`*^9}, {3.7795152637427387`*^9, 3.779515301748084*^9}, {
   3.780041526108283*^9, 3.780041530545414*^9}, 3.780063501754696*^9, 
   3.781596783619473*^9, {3.781596814488657*^9, 3.781596817344576*^9}, {
   3.781597055565585*^9, 3.781597081643642*^9}, {3.781597372942129*^9, 
   3.781597449355983*^9}, 3.781597759959477*^9, {3.7815996008325872`*^9, 
   3.7815996024712973`*^9}, {3.781599723813806*^9, 3.781599730684422*^9}, {
   3.781600289730597*^9, 3.78160029352064*^9}, 3.781600331425515*^9, {
   3.781600542107935*^9, 3.7816005503132753`*^9}, {3.781606643808066*^9, 
   3.781606646222434*^9}, {3.781606763687199*^9, 3.7816067643638144`*^9}, {
   3.7816072419548883`*^9, 3.7816072436566353`*^9}, {3.781607906428276*^9, 
   3.781607907481904*^9}, {3.781607965811386*^9, 3.7816080279750423`*^9}, {
   3.7816080690164967`*^9, 3.781608114413293*^9}, {3.781608198188738*^9, 
   3.781608281394578*^9}, {3.781609293939601*^9, 3.781609309321006*^9}, {
   3.781609476678388*^9, 3.7816094801574097`*^9}, 3.781609556669264*^9, {
   3.781609683361212*^9, 3.781609686256384*^9}, {3.78161226738934*^9, 
   3.78161233215441*^9}, {3.781612442856462*^9, 3.781612470687945*^9}, {
   3.781612593701033*^9, 3.781612631084622*^9}, 3.781614972562765*^9, {
   3.78161524014813*^9, 3.781615240681616*^9}, {3.781615280010507*^9, 
   3.781615290704727*^9}, {3.78161541399857*^9, 3.781615425909526*^9}, {
   3.7816154736611433`*^9, 3.781615539875*^9}, {3.7816155713078127`*^9, 
   3.781615571498477*^9}, {3.781615747215444*^9, 3.781615757366866*^9}, {
   3.781615873272184*^9, 3.7816158734864397`*^9}, {3.7816171015648518`*^9, 
   3.781617130618442*^9}, {3.7816172619773083`*^9, 3.781617263519547*^9}, {
   3.781617481461182*^9, 3.781617482962484*^9}, 3.781617575922841*^9, {
   3.781618101416605*^9, 3.781618102797927*^9}, 3.781618141367907*^9, 
   3.781618245733841*^9, {3.781618387001913*^9, 3.7816183961276197`*^9}, {
   3.7816184695118313`*^9, 3.7816184704617167`*^9}, {3.781618615076729*^9, 
   3.7816186336349707`*^9}, 3.781618678844316*^9, {3.781619582992181*^9, 
   3.7816195836770267`*^9}, {3.7816199327591677`*^9, 3.78161993293364*^9}, {
   3.781619983269676*^9, 3.781619984443877*^9}, {3.781620183776043*^9, 
   3.78162019139979*^9}, {3.781620291456691*^9, 3.781620313028677*^9}, 
   3.781620348773815*^9, 3.781620746029769*^9, {3.78162638436092*^9, 
   3.781626425862638*^9}, {3.781626476431323*^9, 3.781626557691691*^9}, {
   3.781626623884338*^9, 3.781626653401774*^9}, {3.781626729226215*^9, 
   3.781626757215386*^9}, {3.7816268006405373`*^9, 3.7816268463655767`*^9}, 
   3.7816286423998957`*^9, {3.781675057590191*^9, 3.781675076043709*^9}, {
   3.781675556202602*^9, 3.781675642120433*^9}, {3.7816760877603693`*^9, 
   3.781676088950032*^9}, {3.781676158959507*^9, 3.7816762177647467`*^9}, {
   3.781676248133177*^9, 3.781676258405087*^9}, {3.7816790865172863`*^9, 
   3.781679095989188*^9}, {3.7816840064262733`*^9, 3.781684015497168*^9}, {
   3.7816842035970383`*^9, 3.781684203932811*^9}, {3.781684438728621*^9, 
   3.781684441383614*^9}, {3.781684490448798*^9, 3.781684518917966*^9}, {
   3.781684556016069*^9, 3.781684566372897*^9}, {3.781684623556603*^9, 
   3.781684624251807*^9}, {3.7816853526858253`*^9, 3.781685376699265*^9}, {
   3.7816855053767853`*^9, 3.7816855065285807`*^9}, {3.7816855453693533`*^9, 
   3.781685567511063*^9}, {3.781685858875183*^9, 3.78168589982563*^9}, 
   3.781686268609694*^9, {3.781686319248898*^9, 3.7816863194304667`*^9}, {
   3.781686558594583*^9, 3.7816865697534018`*^9}, {3.781859099531748*^9, 
   3.781859156506374*^9}, 3.781859387281911*^9, {3.7818640218257923`*^9, 
   3.781864056813308*^9}, {3.782028552703998*^9, 3.782028587020403*^9}, {
   3.782028941257493*^9, 3.782028942348991*^9}, {3.782029000341112*^9, 
   3.782029035539669*^9}, {3.782029162657709*^9, 3.7820292105949497`*^9}, {
   3.782029266088305*^9, 3.782029294559512*^9}, 3.782030123182132*^9, {
   3.78203020980309*^9, 3.782030213682626*^9}, {3.782030596516942*^9, 
   3.782030597130456*^9}, {3.782030825094961*^9, 3.782030845981477*^9}, {
   3.782032369880467*^9, 3.78203237584664*^9}, {3.782032586572319*^9, 
   3.782032587257971*^9}, {3.782032630824499*^9, 3.782032655001327*^9}, {
   3.7820328091188374`*^9, 3.782032812029166*^9}, {3.782033252832946*^9, 
   3.782033285918296*^9}, {3.7820338684922333`*^9, 3.782033877553089*^9}, {
   3.782033917594111*^9, 3.782033928808517*^9}, {3.782034734097344*^9, 
   3.782034736176887*^9}, {3.782038710823208*^9, 3.782038745308548*^9}, {
   3.7820388946504107`*^9, 3.782038914773587*^9}, {3.782039126909801*^9, 
   3.782039140700597*^9}, {3.782040320476921*^9, 3.7820403474826803`*^9}, {
   3.782040796362956*^9, 3.782040799889357*^9}, {3.7820408459531097`*^9, 
   3.7820408674393263`*^9}, {3.782041161235155*^9, 3.782041162649029*^9}, {
   3.782041636816414*^9, 3.782041637030972*^9}, {3.7820417197994337`*^9, 
   3.78204175356588*^9}, {3.782042230212246*^9, 3.782042234657852*^9}, {
   3.782044974967266*^9, 3.782044975926011*^9}, {3.782045012869179*^9, 
   3.782045015749069*^9}, {3.786968107875774*^9, 3.7869681094012403`*^9}, {
   3.787056554199849*^9, 3.787056555523633*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[904]:=",
 CellID->813290073,ExpressionUUID->"baf8bb79-f460-4e59-ac81-a889605b0a5a"],

Cell[BoxData[
 RowBox[{
  RowBox[{"SynthesiseStructure", "[", "\[IndentingNewLine]", 
   RowBox[{
    RowBox[{"{", 
     RowBox[{
      RowBox[{"{", 
       RowBox[{"A_Integer", ",", "B_Integer", ",", "C_Integer"}], "}"}], ",", 
      "domains_List"}], "}"}], ",", "\[IndentingNewLine]", 
    "outputName_String", ",", "\[IndentingNewLine]", 
    RowBox[{"labelMap_:", 
     RowBox[{"<|", "|>"}]}], ",", "\[IndentingNewLine]", 
    RowBox[{"OptionsPattern", "[", "]"}]}], "]"}], ":=", 
  RowBox[{"Block", "[", 
   RowBox[{
    RowBox[{"{", "\[IndentingNewLine]", 
     RowBox[{
     "blocks", ",", "blockSizes", ",", "outputSize", ",", "b", ",", 
      "targetPositions", ",", "blockCopies", ",", "\[IndentingNewLine]", 
      "coordinatesCrystal", ",", "coordinatesCartesian", ",", 
      "coordinatesCrystalEmbedded", ",", "newCoordinates", ",", 
      "\[IndentingNewLine]", "hostM", ",", "hostMinverse", ",", 
      "targetPositionsCartesian", ",", "M", ",", "T", ",", 
      "\[IndentingNewLine]", 
      RowBox[{"anchorShift", "=", 
       RowBox[{"OptionValue", "[", "\"\<RotationAnchorShift\>\"", "]"}]}], 
      ",", "\[IndentingNewLine]", 
      RowBox[{"anchorReference", "=", 
       RowBox[{"OptionValue", "[", "\"\<RotationAnchorReference\>\"", "]"}]}],
       ",", "\[IndentingNewLine]", 
      RowBox[{"rotationAxes", "=", 
       RowBox[{"OptionValue", "[", "\"\<RotationAxes\>\"", "]"}]}], ",", 
      "\[IndentingNewLine]", 
      RowBox[{"rotationMap", "=", 
       RowBox[{"OptionValue", "[", "\"\<RotationMap\>\"", "]"}]}], ",", 
      "\[IndentingNewLine]", "R", ",", "twist"}], "\[IndentingNewLine]", 
     "}"}], ",", "\[IndentingNewLine]", "\[IndentingNewLine]", 
    RowBox[{"(*", " ", 
     RowBox[{"Checking", " ", "input"}], " ", "*)"}], "\[IndentingNewLine]", 
    RowBox[{
     RowBox[{"blocks", "=", 
      RowBox[{"domains", "/.", "labelMap"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"Scan", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"InputCheck", "[", 
         RowBox[{"\"\<CrystalQ\>\"", ",", "#"}], "]"}], "&"}], ",", 
       RowBox[{"DeleteDuplicates", "@", "blocks"}]}], "]"}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
      "Checking", " ", "if", " ", "all", " ", "blocks", " ", "have", " ", 
       "same", " ", "size"}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"blockSizes", "=", 
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"$CrystalData", "[", 
           RowBox[{"#", ",", "\"\<Notes\>\"", ",", "\"\<StructureSize\>\""}], 
           "]"}], "/.", 
          RowBox[{"_Missing", "\[Rule]", 
           RowBox[{"{", 
            RowBox[{"1", ",", "1", ",", "1"}], "}"}]}]}], ")"}], "&"}], "/@", 
       "blocks"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"!", 
        RowBox[{"SameQ", "@@", "blockSizes"}]}], ",", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"SynthesiseStructure", "::", "DifferentBlockSizes"}], "]"}], 
        ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"blockSizes", "=", 
      RowBox[{
      "blockSizes", "\[LeftDoubleBracket]", "1", "\[RightDoubleBracket]"}]}], 
     ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"(*", " ", 
      RowBox[{
      "Checking", " ", "if", " ", "output", " ", "size", " ", "is", " ", 
       "valid"}], " ", "*)"}], "\[IndentingNewLine]", 
     RowBox[{"outputSize", "=", 
      RowBox[{"{", 
       RowBox[{"A", ",", "B", ",", "C"}], "}"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"A", "*", "B", "*", "C"}], "\[NotEqual]", 
        RowBox[{"Length", "@", "domains"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"SynthesiseStructure", "::", "SizeError"}], "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"(", 
         RowBox[{
          RowBox[{"Length", "@", "outputSize"}], "\[NotEqual]", "3"}], ")"}], 
        "||", 
        RowBox[{"(", 
         RowBox[{"AnyTrue", "[", 
          RowBox[{"outputSize", ",", 
           RowBox[{
            RowBox[{
             RowBox[{"Positive", "[", "#", "]"}], "\[Nand]", 
             RowBox[{"IntegerQ", "[", "#", "]"}]}], "&"}]}], "]"}], ")"}]}], 
       ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"SynthesiseStructure", "::", "InvalidOutputSize"}], "]"}], 
        ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{
        RowBox[{"Total", "@", 
         RowBox[{"MapThread", "[", 
          RowBox[{"Mod", ",", 
           RowBox[{"{", 
            RowBox[{"outputSize", ",", "blockSizes"}], "}"}]}], "]"}]}], "=!=",
         "0"}], ",", "\[IndentingNewLine]", 
       RowBox[{
        RowBox[{"Message", "[", 
         RowBox[{"SynthesiseStructure", "::", "IncompatibleOutputSize"}], 
         "]"}], ";", 
        RowBox[{"Abort", "[", "]"}]}]}], "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"b", "=", 
      RowBox[{"If", "[", 
       RowBox[{
        RowBox[{"TrueQ", "@", 
         RowBox[{"OptionValue", "[", "\"\<UsePlacementBuffer\>\"", "]"}]}], 
        ",", "2", ",", "1"}], "]"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"targetPositions", "=", 
      RowBox[{"Flatten", "[", 
       RowBox[{
        RowBox[{"Table", "[", 
         RowBox[{
          RowBox[{"{", 
           RowBox[{"i", ",", "j", ",", "k"}], "}"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"{", 
           RowBox[{"i", ",", "0.", ",", 
            RowBox[{
             RowBox[{"b", "*", 
              RowBox[{
              "outputSize", "\[LeftDoubleBracket]", "1", 
               "\[RightDoubleBracket]"}]}], "-", "1"}], ",", 
            RowBox[{"b", "*", 
             RowBox[{
             "blockSizes", "\[LeftDoubleBracket]", "1", 
              "\[RightDoubleBracket]"}]}]}], "}"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"{", 
           RowBox[{"j", ",", "0.", ",", 
            RowBox[{
             RowBox[{"b", "*", 
              RowBox[{
              "outputSize", "\[LeftDoubleBracket]", "2", 
               "\[RightDoubleBracket]"}]}], "-", "1"}], ",", 
            RowBox[{"b", "*", 
             RowBox[{
             "blockSizes", "\[LeftDoubleBracket]", "2", 
              "\[RightDoubleBracket]"}]}]}], "}"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"{", 
           RowBox[{"k", ",", "0.", ",", 
            RowBox[{
             RowBox[{"b", "*", 
              RowBox[{
              "outputSize", "\[LeftDoubleBracket]", "3", 
               "\[RightDoubleBracket]"}]}], "-", "1"}], ",", 
            RowBox[{"b", "*", 
             RowBox[{
             "blockSizes", "\[LeftDoubleBracket]", "3", 
              "\[RightDoubleBracket]"}]}]}], "}"}]}], "\[IndentingNewLine]", 
         "]"}], ",", "2"}], "]"}]}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"AppendTo", "[", 
      RowBox[{"$CrystalData", ",", 
       RowBox[{"outputName", "\[Rule]", 
        RowBox[{"$CrystalData", "@", 
         RowBox[{"First", "@", "blocks"}]}]}]}], "]"}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"hostM", "=", 
      RowBox[{"GetCrystalMetric", "[", 
       RowBox[{"outputName", ",", 
        RowBox[{"\"\<ToCartesian\>\"", "\[Rule]", "True"}]}], "]"}]}], ";", 
     "\[IndentingNewLine]", 
     RowBox[{"hostMinverse", "=", 
      RowBox[{"Inverse", "@", "hostM"}]}], ";", "\[IndentingNewLine]", 
     RowBox[{"targetPositionsCartesian", "=", 
      RowBox[{
       RowBox[{
        RowBox[{"hostM", ".", "#"}], "&"}], "/@", "targetPositions"}]}], ";", 
     "\[IndentingNewLine]", "\[IndentingNewLine]", 
     RowBox[{"If", "[", 
      RowBox[{
       RowBox[{"rotationMap", "=!=", 
        RowBox[{"<|", "|>"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{"R", "=", 
        RowBox[{"InputCheck", "[", 
         RowBox[{"\"\<RotationTransformation\>\"", ",", 
          RowBox[{"{", 
           RowBox[{"outputSize", ",", "domains"}], "}"}], ",", 
          "\[IndentingNewLine]", 
          RowBox[{"{", 
           RowBox[{
           "anchorShift", ",", "anchorReference", ",", "rotationMap", ",", 
            "rotationAxes"}], "}"}], ",", "True"}], "]"}]}]}], 
      "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{"blockCopies", "=", 
      RowBox[{"$CrystalData", "/@", "blocks"}]}], ";", "\[IndentingNewLine]", 
     
     RowBox[{"Do", "[", "\[IndentingNewLine]", 
      RowBox[{
       RowBox[{
        RowBox[{"M", "=", 
         RowBox[{"GetCrystalMetric", "[", 
          RowBox[{
           RowBox[{
           "blocks", "\[LeftDoubleBracket]", "i", "\[RightDoubleBracket]"}], 
           ",", 
           RowBox[{"\"\<ToCartesian\>\"", "\[Rule]", "True"}]}], "]"}]}], ";",
         "\[IndentingNewLine]", 
        RowBox[{"T", "=", 
         RowBox[{"TranslationTransform", "[", 
          RowBox[{
          "targetPositions", "\[LeftDoubleBracket]", "i", 
           "\[RightDoubleBracket]"}], "]"}]}], ";", "\[IndentingNewLine]", 
        "\[IndentingNewLine]", 
        RowBox[{"coordinatesCrystal", "=", 
         RowBox[{"blockCopies", "\[LeftDoubleBracket]", 
          RowBox[{
          "i", ",", "\"\<AtomData\>\"", ",", "All", ",", 
           "\"\<FractionalCoordinates\>\""}], "\[RightDoubleBracket]"}]}], 
        ";", "\[IndentingNewLine]", 
        RowBox[{"coordinatesCartesian", "=", 
         RowBox[{
          RowBox[{
           RowBox[{"M", ".", "#"}], "&"}], "/@", "coordinatesCrystal"}]}], 
        ";", "\[IndentingNewLine]", 
        RowBox[{"coordinatesCrystalEmbedded", "=", 
         RowBox[{
          RowBox[{
           RowBox[{"hostMinverse", ".", "#"}], "&"}], "/@", 
          "coordinatesCartesian"}]}], ";", "\[IndentingNewLine]", 
        RowBox[{"newCoordinates", "=", 
         RowBox[{"T", "/@", "coordinatesCrystalEmbedded"}]}], ";", 
        "\[IndentingNewLine]", "\[IndentingNewLine]", 
        RowBox[{"If", "[", 
         RowBox[{
          RowBox[{"rotationMap", "=!=", 
           RowBox[{"<|", "|>"}]}], ",", "\[IndentingNewLine]", 
          RowBox[{
           RowBox[{"twist", "=", 
            RowBox[{"R", "[", 
             RowBox[{
              RowBox[{
              "domains", "\[LeftDoubleBracket]", "i", 
               "\[RightDoubleBracket]"}], ",", 
              RowBox[{
              "targetPositionsCartesian", "\[LeftDoubleBracket]", "i", 
               "\[RightDoubleBracket]"}]}], "]"}]}], ";", 
           "\[IndentingNewLine]", 
           RowBox[{"coordinatesCartesian", "=", 
            RowBox[{
             RowBox[{
              RowBox[{"hostM", ".", "#"}], "&"}], "/@", "newCoordinates"}]}], 
           ";", "\[IndentingNewLine]", 
           RowBox[{"coordinatesCartesian", "=", 
            RowBox[{"twist", "@", "coordinatesCartesian"}]}], ";", 
           "\[IndentingNewLine]", 
           RowBox[{"newCoordinates", "=", 
            RowBox[{
             RowBox[{
              RowBox[{"hostMinverse", ".", "#"}], "&"}], "/@", 
             "coordinatesCartesian"}]}]}]}], "\[IndentingNewLine]", "]"}], 
        ";", "\[IndentingNewLine]", "\[IndentingNewLine]", 
        RowBox[{
         RowBox[{"blockCopies", "\[LeftDoubleBracket]", 
          RowBox[{
          "i", ",", "\"\<AtomData\>\"", ",", "All", ",", 
           "\"\<FractionalCoordinates\>\""}], "\[RightDoubleBracket]"}], "=", 
         "newCoordinates"}]}], ",", "\[IndentingNewLine]", 
       RowBox[{"{", 
        RowBox[{"i", ",", "2", ",", 
         RowBox[{"Length", "@", "blockCopies"}]}], "}"}]}], 
      "\[IndentingNewLine]", "]"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"$CrystalData", "[", 
       RowBox[{"outputName", ",", "\"\<AtomData\>\""}], "]"}], "=", 
      RowBox[{"Flatten", "@", 
       RowBox[{"blockCopies", "\[LeftDoubleBracket]", 
        RowBox[{"All", ",", "\"\<AtomData\>\""}], 
        "\[RightDoubleBracket]"}]}]}], ";", "\[IndentingNewLine]", 
     RowBox[{
      RowBox[{"$CrystalData", "[", 
       RowBox[{
       "outputName", ",", "\"\<Notes\>\"", ",", "\"\<StructureSize\>\""}], 
       "]"}], "=", "outputSize"}], ";", "\[IndentingNewLine]", 
     "\[IndentingNewLine]", "outputName"}]}], "\[IndentingNewLine]", 
   "]"}]}]], "Input",
 InitializationCell->False,
 CellChangeTimes->{{3.682241896337058*^9, 3.6822419009563293`*^9}, {
   3.6822421030731297`*^9, 3.682242104796829*^9}, {3.682242247634622*^9, 
   3.682242293608499*^9}, {3.6822423242774973`*^9, 3.6822424939877663`*^9}, {
   3.682242524871819*^9, 3.682242610095582*^9}, {3.6822426631468697`*^9, 
   3.682242849688897*^9}, {3.682242985123843*^9, 3.682243000592795*^9}, {
   3.682243032221999*^9, 3.682243042906146*^9}, {3.682243121993319*^9, 
   3.682243187533738*^9}, {3.6822433171568623`*^9, 3.682243318068676*^9}, {
   3.6822433533711243`*^9, 3.68224345949043*^9}, {3.682243499999116*^9, 
   3.682243500570818*^9}, {3.682243559642397*^9, 3.682243568303032*^9}, {
   3.682243656585619*^9, 3.682243807041559*^9}, {3.682243892622666*^9, 
   3.682243979341007*^9}, {3.682244011749632*^9, 3.682244092729911*^9}, {
   3.6822441869470167`*^9, 3.682244221175058*^9}, {3.68224427065597*^9, 
   3.682244283409008*^9}, {3.6822443160128517`*^9, 3.682244326447394*^9}, {
   3.682244392020493*^9, 3.682244400571671*^9}, {3.682244596208706*^9, 
   3.682244803339835*^9}, {3.682244951115906*^9, 3.6822449654470167`*^9}, {
   3.682247256239483*^9, 3.682247304444981*^9}, {3.682247343926553*^9, 
   3.682247361035624*^9}, {3.682247395780785*^9, 3.6822474984407682`*^9}, {
   3.6822475305652437`*^9, 3.682247636381772*^9}, {3.6822476807262373`*^9, 
   3.682247690229601*^9}, {3.682247723533629*^9, 3.682247825538166*^9}, {
   3.682247866195016*^9, 3.6822478768890457`*^9}, {3.682247927112714*^9, 
   3.682248080675892*^9}, {3.682248357004342*^9, 3.682248375626561*^9}, {
   3.6822486441315317`*^9, 3.682248669634107*^9}, 3.68224956936229*^9, 
   3.682262332986014*^9, {3.6822623719028997`*^9, 3.68226237223594*^9}, {
   3.682312281830681*^9, 3.6823123030407467`*^9}, {3.682323578349629*^9, 
   3.682323592418137*^9}, {3.6823237158461313`*^9, 3.682323721213748*^9}, 
   3.682327662602072*^9, {3.6824963506791697`*^9, 3.6824963547512217`*^9}, {
   3.682496400113083*^9, 3.682496493228437*^9}, 3.682677149488262*^9, {
   3.685082142306231*^9, 3.6850821530756807`*^9}, 3.685084035768195*^9, {
   3.68655238046353*^9, 3.686552426771611*^9}, {3.6865525950866337`*^9, 
   3.686552685595372*^9}, {3.686635545814003*^9, 3.686635612323032*^9}, {
   3.686645933806924*^9, 3.686646007894505*^9}, {3.686646064248117*^9, 
   3.68664607682882*^9}, {3.686655195368894*^9, 3.6866552343027163`*^9}, {
   3.6866553151103287`*^9, 3.686655409251244*^9}, {3.6866554490764103`*^9, 
   3.686655514039054*^9}, {3.686655580018355*^9, 3.686655635546473*^9}, {
   3.686655748745368*^9, 3.686655776590246*^9}, {3.714925556554666*^9, 
   3.714925578583651*^9}, {3.7149256217212152`*^9, 3.714925689133297*^9}, {
   3.7149258652268667`*^9, 3.714925953487383*^9}, {3.71492600096751*^9, 
   3.714926119019596*^9}, {3.714926175338132*^9, 3.714926196305581*^9}, 
   3.7149262352489967`*^9, {3.714926307824396*^9, 3.7149264095004387`*^9}, {
   3.714926450015284*^9, 3.7149265295624437`*^9}, {3.7149265755610447`*^9, 
   3.714926579417263*^9}, {3.714926655695353*^9, 3.714926765295703*^9}, {
   3.714927064423978*^9, 3.714927159155733*^9}, {3.7149272069557753`*^9, 
   3.7149276407442627`*^9}, {3.714927818589819*^9, 3.714927894002508*^9}, {
   3.715014199691877*^9, 3.7150142148573313`*^9}, {3.715064942408142*^9, 
   3.715064943132308*^9}, {3.7153145414034758`*^9, 3.7153145467616673`*^9}, 
   3.715327856633502*^9, {3.7154051731829433`*^9, 3.7154051929183903`*^9}, {
   3.7154052332773438`*^9, 3.715405253294734*^9}, {3.715405360310897*^9, 
   3.7154054069587708`*^9}, {3.717222403726162*^9, 3.717222415552843*^9}, {
   3.717222474077138*^9, 3.717222480379856*^9}, {3.7172225774835167`*^9, 
   3.717222584585285*^9}, {3.717740920496456*^9, 3.71774092050616*^9}, {
   3.7220727239925957`*^9, 3.722072731381322*^9}, {3.722072809534255*^9, 
   3.722072832036512*^9}, {3.722072863802107*^9, 3.722072898519074*^9}, 
   3.726561391058339*^9, 3.727675293483314*^9, 3.727676783958682*^9, {
   3.728106031257224*^9, 3.7281060589380007`*^9}, {3.728106180011772*^9, 
   3.728106202173979*^9}, {3.728106287634863*^9, 3.728106301113369*^9}, {
   3.7281063321779118`*^9, 3.728106374799776*^9}, {3.7281065875793667`*^9, 
   3.728106596424721*^9}, {3.728106935268379*^9, 3.728106947051586*^9}, {
   3.728107085050242*^9, 3.728107225807564*^9}, {3.7281087296199503`*^9, 
   3.7281087417638607`*^9}, {3.728108952031921*^9, 3.728108953406122*^9}, 
   3.728109068830366*^9, {3.728109140732355*^9, 3.728109162684065*^9}, 
   3.7281092259390078`*^9, 3.737968467010312*^9, {3.7455680832964697`*^9, 
   3.745568119889543*^9}, {3.747569432494769*^9, 3.747569442874075*^9}, {
   3.74756949426586*^9, 3.747569500574552*^9}, {3.7475695377399282`*^9, 
   3.7475695465343924`*^9}, {3.7475699175021257`*^9, 3.747569978808453*^9}, {
   3.747570081604307*^9, 3.7475700987875013`*^9}, {3.747570851329288*^9, 
   3.747570860993803*^9}, {3.747570941533657*^9, 3.747570947293482*^9}, {
   3.747570979528742*^9, 3.747570979833435*^9}, {3.7475710460233097`*^9, 
   3.747571047925109*^9}, {3.747571084476077*^9, 3.747571086328722*^9}, {
   3.747571371903867*^9, 3.7475713729193487`*^9}, {3.747571561267179*^9, 
   3.747571562589777*^9}, {3.747572757880087*^9, 3.747572827753377*^9}, {
   3.747572862364382*^9, 3.747572879792859*^9}, {3.759519240146062*^9, 
   3.759519241328768*^9}, {3.7609498833793907`*^9, 3.76094989465484*^9}, {
   3.760985435505022*^9, 3.760985472615333*^9}, {3.761044721985759*^9, 
   3.7610447510077763`*^9}, {3.76104481522427*^9, 3.761044820157362*^9}, {
   3.76104492312523*^9, 3.76104492561299*^9}, {3.761045245983004*^9, 
   3.7610452901170893`*^9}, {3.761045366668412*^9, 3.761045378723996*^9}, {
   3.76124639061635*^9, 3.761246410336463*^9}, {3.761246468837595*^9, 
   3.761246470395545*^9}, {3.761246673739036*^9, 3.761246692142757*^9}, {
   3.761246756527741*^9, 3.761246831173169*^9}, {3.7612468685554323`*^9, 
   3.761246869827717*^9}, {3.7612469112124767`*^9, 3.761247051614558*^9}, {
   3.761247130070651*^9, 3.7612471343322563`*^9}, {3.761247190774343*^9, 
   3.761247226696908*^9}, {3.7612472608003902`*^9, 3.761247277095755*^9}, {
   3.7612473349529333`*^9, 3.761247347238995*^9}, {3.761247379119833*^9, 
   3.761247382237371*^9}, {3.761247500765175*^9, 3.761247531645439*^9}, {
   3.761247581531475*^9, 3.761247581665276*^9}, {3.76124761695472*^9, 
   3.761247712374427*^9}, {3.7612478775715733`*^9, 3.7612479024911127`*^9}, {
   3.761248027065674*^9, 3.7612480322790403`*^9}, {3.761248133261649*^9, 
   3.761248133821176*^9}, {3.762483079092483*^9, 3.762483079506445*^9}, {
   3.7624831653076982`*^9, 3.762483255155518*^9}, {3.762483448748105*^9, 
   3.762483459337694*^9}, {3.762484937954467*^9, 3.762484940528129*^9}, {
   3.762485478717585*^9, 3.762485519250081*^9}, {3.762485687785385*^9, 
   3.7624856997759*^9}, {3.762485763767784*^9, 3.7624857909884033`*^9}, {
   3.762485821389303*^9, 3.762485821901321*^9}, {3.762485865116181*^9, 
   3.76248587338028*^9}, {3.7624863035622253`*^9, 3.762486306889323*^9}, 
   3.7624864059931593`*^9, {3.762486451749774*^9, 3.762486453088664*^9}, {
   3.762486658295171*^9, 3.762486679735591*^9}, {3.762486914173285*^9, 
   3.762486976278838*^9}, {3.762487161588236*^9, 3.762487164161865*^9}, {
   3.762582301146738*^9, 3.762582302868475*^9}, {3.7625825420446243`*^9, 
   3.7625825422070208`*^9}, 3.7627930931894283`*^9, {3.763708440950055*^9, 
   3.763708444458358*^9}, {3.763795706131096*^9, 3.76379571208855*^9}, {
   3.763795807464473*^9, 3.763795831454368*^9}, {3.767429560180451*^9, 
   3.767429568446164*^9}, 3.770459731594898*^9, 3.77045978949087*^9, {
   3.7704599395191603`*^9, 3.770459942350878*^9}, {3.770460320192504*^9, 
   3.77046034225856*^9}, {3.770460744443172*^9, 3.770460790673462*^9}, {
   3.770462722783415*^9, 3.770462726522499*^9}, {3.770462870041655*^9, 
   3.770462893092216*^9}, {3.770463235775403*^9, 3.770463354490316*^9}, {
   3.770464803344589*^9, 3.7704649431280527`*^9}, {3.7704649769113207`*^9, 
   3.770464999988723*^9}, {3.7704651173818903`*^9, 3.770465120129682*^9}, {
   3.770465209927898*^9, 3.770465248981803*^9}, {3.7704652797498713`*^9, 
   3.770465415928398*^9}, {3.770465537455702*^9, 3.7704655656201468`*^9}, {
   3.770465641152669*^9, 3.770465644794568*^9}, {3.770466103176922*^9, 
   3.7704661912147818`*^9}, {3.7704662256847267`*^9, 3.770466424544442*^9}, {
   3.77046647576213*^9, 3.77046647708055*^9}, {3.7704666316257477`*^9, 
   3.770466663729806*^9}, {3.770569455033873*^9, 3.77056947362365*^9}, {
   3.770569965186427*^9, 3.770569975517632*^9}, {3.770613455882739*^9, 
   3.7706134615311623`*^9}, {3.7706144368471527`*^9, 3.770614455550804*^9}, {
   3.770614642444923*^9, 3.770614648346962*^9}, {3.7706146872518663`*^9, 
   3.770614706809328*^9}, {3.770615780706581*^9, 3.770615837875382*^9}, {
   3.770616067975326*^9, 3.770616161127016*^9}, {3.770616281788673*^9, 
   3.770616338679316*^9}, {3.770616527688498*^9, 3.770616578229919*^9}, {
   3.770617519347665*^9, 3.770617618502255*^9}, {3.770617715683031*^9, 
   3.770617752463728*^9}, {3.770618116138035*^9, 3.7706181296219597`*^9}, {
   3.770618161047112*^9, 3.770618195582769*^9}, {3.77061840921166*^9, 
   3.770618429996653*^9}, {3.7706188774711227`*^9, 3.770618880463545*^9}, {
   3.77061898635938*^9, 3.7706190570356627`*^9}, {3.7706191262161617`*^9, 
   3.770619143850253*^9}, {3.770620393630209*^9, 3.770620411752057*^9}, {
   3.7706205414208717`*^9, 3.770620595073638*^9}, {3.770620635698071*^9, 
   3.770620694965639*^9}, {3.770621285358365*^9, 3.7706213228053513`*^9}, {
   3.770621746590682*^9, 3.770621913127598*^9}, {3.7706250264948063`*^9, 
   3.7706250284066973`*^9}, {3.770625143129756*^9, 3.770625145122254*^9}, {
   3.770625196698786*^9, 3.770625226825259*^9}, {3.770625271797394*^9, 
   3.770625299948307*^9}, {3.770625340917306*^9, 3.7706253455065393`*^9}, {
   3.770625406711595*^9, 3.770625439263268*^9}, {3.770625484959586*^9, 
   3.7706254896638517`*^9}, {3.7706255324719887`*^9, 3.770625536534584*^9}, {
   3.770625601643078*^9, 3.770625660115859*^9}, {3.7706269748593388`*^9, 
   3.770626983180786*^9}, {3.770978748150028*^9, 3.770978844135597*^9}, {
   3.770981565611477*^9, 3.7709815849544163`*^9}, {3.771139352384213*^9, 
   3.771139435725677*^9}, {3.771141989286028*^9, 3.7711419920245047`*^9}, {
   3.771143011683299*^9, 3.771143018616251*^9}, {3.771143059910726*^9, 
   3.771143079334529*^9}, {3.771143112487186*^9, 3.771143118121806*^9}, {
   3.771143199801591*^9, 3.771143243956092*^9}, {3.771143352696369*^9, 
   3.7711433596184072`*^9}, {3.7742037135564613`*^9, 3.77420371903445*^9}, {
   3.7790460331623583`*^9, 3.779046038683786*^9}, {3.7790465556133432`*^9, 
   3.779046557949313*^9}, {3.7790466210358686`*^9, 3.779046629035347*^9}, {
   3.779076173162829*^9, 3.779076186108962*^9}, {3.779076376706129*^9, 
   3.7790764050721207`*^9}, {3.77907707240198*^9, 3.7790770727759323`*^9}, {
   3.779077116904462*^9, 3.7790771363191557`*^9}, {3.779077222030397*^9, 
   3.7790772451963463`*^9}, {3.779077278292552*^9, 3.779077293810793*^9}, {
   3.779077327756048*^9, 3.7790773461225557`*^9}, {3.779077400971356*^9, 
   3.779077401392465*^9}, {3.779078652836025*^9, 3.779078674233534*^9}, {
   3.7790789366442738`*^9, 3.77907905698431*^9}, {3.779080313783312*^9, 
   3.779080335990597*^9}, {3.7790804083883467`*^9, 3.779080409644253*^9}, {
   3.7790805587124434`*^9, 3.7790805924157047`*^9}, {3.779080668254277*^9, 
   3.779080748955948*^9}, 3.779080921313138*^9, {3.7790812563695297`*^9, 
   3.77908127282437*^9}, {3.779081329711192*^9, 3.779081329862935*^9}, {
   3.779081417629828*^9, 3.779081417885152*^9}, {3.7790815112035303`*^9, 
   3.779081567874836*^9}, {3.77908160297834*^9, 3.779081605410418*^9}, 
   3.779081642634364*^9, {3.779081818726289*^9, 3.779081818836506*^9}, {
   3.779081927827957*^9, 3.779081942290485*^9}, 3.7790819834125433`*^9, {
   3.779082026115778*^9, 3.7790820572111673`*^9}, {3.779082093109037*^9, 
   3.7790820934351387`*^9}, {3.779082505418542*^9, 3.779082582504551*^9}, {
   3.779082618161819*^9, 3.779082631974813*^9}, {3.7790833281717787`*^9, 
   3.7790833468169813`*^9}, {3.77908339321735*^9, 3.779083393359188*^9}, {
   3.779092931617548*^9, 3.779092941695651*^9}, 3.779092984373472*^9, 
   3.779093025471065*^9, {3.779093233015196*^9, 3.779093283089419*^9}, {
   3.779093347114683*^9, 3.779093358570322*^9}, {3.779093403195031*^9, 
   3.7790934294666843`*^9}, {3.779093483226296*^9, 3.779093671972971*^9}, {
   3.7790938415876703`*^9, 3.779093852432088*^9}, {3.7790943233708687`*^9, 
   3.77909436834396*^9}, {3.779132230691679*^9, 3.779132232130753*^9}, {
   3.7791322913529873`*^9, 3.779132328976726*^9}, {3.77913238294314*^9, 
   3.7791323831025457`*^9}, {3.779132416197893*^9, 3.779132481875678*^9}, {
   3.77913259690576*^9, 3.7791325984885693`*^9}, {3.779132633232272*^9, 
   3.7791327488973618`*^9}, {3.7791328356007566`*^9, 3.779132910565886*^9}, {
   3.779133291303643*^9, 3.77913350030802*^9}, {3.779133718247943*^9, 
   3.779133783523141*^9}, {3.779133814469346*^9, 3.779133815579176*^9}, {
   3.7791338790756273`*^9, 3.779133927424109*^9}, {3.779134513294778*^9, 
   3.779134564659233*^9}, {3.779134801244445*^9, 3.7791348453220997`*^9}, {
   3.7794598997260113`*^9, 3.779459946548224*^9}, {3.779459993534259*^9, 
   3.779460003612535*^9}, {3.77946003619566*^9, 3.7794600405698*^9}, {
   3.779460177055881*^9, 3.7794601841982183`*^9}, {3.779465818564105*^9, 
   3.779465837840556*^9}, {3.77946587589717*^9, 3.779465898190446*^9}, {
   3.779465943255336*^9, 3.779466009822507*^9}, {3.77946625854605*^9, 
   3.779466264350567*^9}, {3.7794707100815363`*^9, 3.779470791459454*^9}, {
   3.7794708372044983`*^9, 3.7794708430662127`*^9}, {3.7794708736280003`*^9, 
   3.779470889041346*^9}, {3.779471386472715*^9, 3.779471387758445*^9}, {
   3.7794727024761457`*^9, 3.779472704537242*^9}, {3.7794729380386343`*^9, 
   3.779472947702175*^9}, {3.779473633377185*^9, 3.7794736351008883`*^9}, {
   3.779475306395953*^9, 3.779475308136442*^9}, {3.7795148511524153`*^9, 
   3.7795148554943247`*^9}, {3.7795152637427387`*^9, 3.779515301748084*^9}, {
   3.780041526108283*^9, 3.780041530545414*^9}, 3.780063501754696*^9, 
   3.781596783619473*^9, {3.781596814488657*^9, 3.781596817344576*^9}, {
   3.781597055565585*^9, 3.781597081643642*^9}, {3.781597372942129*^9, 
   3.781597449355983*^9}, 3.781597759959477*^9, {3.7815996008325872`*^9, 
   3.7815996024712973`*^9}, {3.781599723813806*^9, 3.781599730684422*^9}, {
   3.781600289730597*^9, 3.78160029352064*^9}, 3.781600331425515*^9, {
   3.781600542107935*^9, 3.7816005503132753`*^9}, {3.781606643808066*^9, 
   3.781606646222434*^9}, {3.781606763687199*^9, 3.7816067643638144`*^9}, {
   3.7816072419548883`*^9, 3.7816072436566353`*^9}, {3.781607906428276*^9, 
   3.781607907481904*^9}, {3.781607965811386*^9, 3.7816080279750423`*^9}, {
   3.7816080690164967`*^9, 3.781608114413293*^9}, {3.781608198188738*^9, 
   3.781608281394578*^9}, {3.781609293939601*^9, 3.781609309321006*^9}, {
   3.781609476678388*^9, 3.7816094801574097`*^9}, 3.781609556669264*^9, {
   3.781609683361212*^9, 3.781609686256384*^9}, {3.78161226738934*^9, 
   3.78161233215441*^9}, {3.781612442856462*^9, 3.781612470687945*^9}, {
   3.781612593701033*^9, 3.781612631084622*^9}, 3.781614972562765*^9, {
   3.78161524014813*^9, 3.781615240681616*^9}, {3.781615280010507*^9, 
   3.781615290704727*^9}, {3.78161541399857*^9, 3.781615425909526*^9}, {
   3.7816154736611433`*^9, 3.781615539875*^9}, {3.7816155713078127`*^9, 
   3.781615571498477*^9}, {3.781615747215444*^9, 3.781615757366866*^9}, {
   3.781615873272184*^9, 3.7816158734864397`*^9}, {3.7816171015648518`*^9, 
   3.781617130618442*^9}, {3.7816172619773083`*^9, 3.781617263519547*^9}, {
   3.781617481461182*^9, 3.781617482962484*^9}, 3.781617575922841*^9, {
   3.781618101416605*^9, 3.781618102797927*^9}, 3.781618141367907*^9, 
   3.781618245733841*^9, {3.781618387001913*^9, 3.7816183961276197`*^9}, {
   3.7816184695118313`*^9, 3.7816184704617167`*^9}, {3.781618615076729*^9, 
   3.7816186336349707`*^9}, 3.781618678844316*^9, {3.781619582992181*^9, 
   3.7816195836770267`*^9}, {3.7816199327591677`*^9, 3.78161993293364*^9}, {
   3.781619983269676*^9, 3.781619984443877*^9}, {3.781620183776043*^9, 
   3.78162019139979*^9}, {3.781620291456691*^9, 3.781620313028677*^9}, 
   3.781620348773815*^9, 3.781620746029769*^9, {3.78162638436092*^9, 
   3.781626425862638*^9}, {3.781626476431323*^9, 3.781626557691691*^9}, {
   3.781626623884338*^9, 3.781626653401774*^9}, {3.781626729226215*^9, 
   3.781626757215386*^9}, {3.7816268006405373`*^9, 3.7816268463655767`*^9}, 
   3.7816286423998957`*^9, {3.781675057590191*^9, 3.781675076043709*^9}, {
   3.781675556202602*^9, 3.781675642120433*^9}, {3.7816760877603693`*^9, 
   3.781676088950032*^9}, {3.781676158959507*^9, 3.7816762177647467`*^9}, {
   3.781676248133177*^9, 3.781676258405087*^9}, {3.7816790865172863`*^9, 
   3.781679095989188*^9}, {3.7816840064262733`*^9, 3.781684015497168*^9}, {
   3.7816842035970383`*^9, 3.781684203932811*^9}, {3.781684438728621*^9, 
   3.781684441383614*^9}, {3.781684490448798*^9, 3.781684518917966*^9}, {
   3.781684556016069*^9, 3.781684566372897*^9}, {3.781684623556603*^9, 
   3.781684624251807*^9}, {3.7816853526858253`*^9, 3.781685376699265*^9}, {
   3.7816855053767853`*^9, 3.7816855065285807`*^9}, {3.7816855453693533`*^9, 
   3.781685567511063*^9}, {3.781685858875183*^9, 3.78168589982563*^9}, 
   3.781686268609694*^9, {3.781686319248898*^9, 3.7816863194304667`*^9}, {
   3.781686558594583*^9, 3.7816865697534018`*^9}, {3.781859099531748*^9, 
   3.781859156506374*^9}, 3.781859387281911*^9, {3.7818640218257923`*^9, 
   3.781864056813308*^9}, {3.782028552703998*^9, 3.782028587020403*^9}, {
   3.782028941257493*^9, 3.782028942348991*^9}, {3.782029000341112*^9, 
   3.782029035539669*^9}, {3.782029162657709*^9, 3.7820292105949497`*^9}, {
   3.782029266088305*^9, 3.782029294559512*^9}, 3.782030123182132*^9, {
   3.78203020980309*^9, 3.782030213682626*^9}, {3.782030596516942*^9, 
   3.782030597130456*^9}, {3.782030825094961*^9, 3.782030845981477*^9}, {
   3.782032369880467*^9, 3.78203237584664*^9}, {3.782032586572319*^9, 
   3.782032587257971*^9}, {3.782032630824499*^9, 3.782032655001327*^9}, {
   3.7820328091188374`*^9, 3.782032812029166*^9}, {3.782033252832946*^9, 
   3.782033285918296*^9}, {3.7820338684922333`*^9, 3.782033877553089*^9}, {
   3.782033917594111*^9, 3.782033928808517*^9}, {3.782034734097344*^9, 
   3.782034736176887*^9}, {3.782038710823208*^9, 3.782038745308548*^9}, {
   3.7820388946504107`*^9, 3.782038914773587*^9}, {3.782039126909801*^9, 
   3.782039140700597*^9}, {3.782040320476921*^9, 3.7820403474826803`*^9}, {
   3.782040796362956*^9, 3.782040799889357*^9}, {3.7820408459531097`*^9, 
   3.7820408674393263`*^9}, {3.782041161235155*^9, 3.782041162649029*^9}, {
   3.782041636816414*^9, 3.782041637030972*^9}, {3.7820417197994337`*^9, 
   3.78204175356588*^9}, {3.7820421697004538`*^9, 3.7820422139376907`*^9}, 
   3.782045008709709*^9, {3.7820456806005793`*^9, 3.7820457037026443`*^9}, {
   3.782046562755872*^9, 3.782046563643471*^9}, {3.782046618914783*^9, 
   3.782046753279845*^9}, {3.782046797175049*^9, 3.782046797623851*^9}, {
   3.782046830806437*^9, 3.782046855629388*^9}, {3.782047057329648*^9, 
   3.782047095695794*^9}, {3.78204713704733*^9, 3.782047151927642*^9}, {
   3.782047259957144*^9, 3.7820472619653482`*^9}, {3.782047342659054*^9, 
   3.782047365978188*^9}, {3.782047397747666*^9, 3.782047436824929*^9}, {
   3.78204752438588*^9, 3.782047553905918*^9}, {3.782047700221315*^9, 
   3.782047729418625*^9}, 3.7820478025536013`*^9, {3.782047937032391*^9, 
   3.782048009748714*^9}, {3.7820480614532013`*^9, 3.782048119090255*^9}, {
   3.7820484207082987`*^9, 3.782048560169928*^9}, {3.7820486666478653`*^9, 
   3.782048712358963*^9}, {3.782049437895391*^9, 3.782049452206506*^9}, {
   3.782049688145772*^9, 3.782049716032612*^9}, 3.782049864768108*^9, {
   3.7820498989341087`*^9, 3.7820499263003798`*^9}, {3.782049981595697*^9, 
   3.782050392028247*^9}, {3.782050425117622*^9, 3.782050451020184*^9}, {
   3.7820505042191*^9, 3.782050523779109*^9}, {3.782050561522791*^9, 
   3.7820505762090893`*^9}, {3.7820506103791533`*^9, 3.782050663535224*^9}, {
   3.782050770224032*^9, 3.7820508194839487`*^9}, {3.782050851780014*^9, 
   3.782050899963357*^9}, {3.782050932578496*^9, 3.782050940169877*^9}, {
   3.782050988627522*^9, 3.78205101265306*^9}, {3.782051070026618*^9, 
   3.782051117438787*^9}, {3.782051332316132*^9, 3.782051353904725*^9}, {
   3.782070812680416*^9, 3.782070825534471*^9}, {3.78207380916749*^9, 
   3.782073819557263*^9}, {3.78247502660347*^9, 3.782475028009947*^9}, {
   3.7824756597218018`*^9, 3.78247568067133*^9}, {3.78247594907412*^9, 
   3.782475949370171*^9}, {3.782475980265849*^9, 3.7824759886969967`*^9}, {
   3.7869681125322447`*^9, 3.786968113809771*^9}},
 Background->RGBColor[0.94, 0.91, 0.88],
 CellLabel->"In[905]:=",
 CellID->232843756,ExpressionUUID->"2a924cb3-91b6-43e0-b561-139fd3e020b4"]
}, Closed]]
}, Open  ]]
},
WindowSize->Medium,
WindowMargins->Automatic,
Visible->True,
CellContext->"Global`",
FrontEndVersion->"11.3 for Mac OS X x86 (32-bit, 64-bit Kernel) (March 5, \
2018)",
StyleDefinitions->FrontEnd`FileName[{"Wolfram"}, "FunctionPageStyles.nb", 
  CharacterEncoding -> "UTF-8"]
]
(* End of Notebook Content *)

(* Internal cache information *)
(*CellTagsOutline
CellTagsIndex->{
 "ExtendedExamples"->{
  Cell[39237, 983, 155, 2, 56, "ExtendedExamplesSection",ExpressionUUID->"42d70f0f-37a0-4b44-a088-1361891c78c7",
   CellTags->"ExtendedExamples",
   CellID->1854448968]}
 }
*)
(*CellTagsIndex
CellTagsIndex->{
 {"ExtendedExamples", 156613, 3528}
 }
*)
(*NotebookFileOutline
Notebook[{
Cell[558, 20, 673, 15, 24, "History",ExpressionUUID->"a88991d0-0b28-47fc-bb4b-06122308bc09",
 CellID->1247902091],
Cell[CellGroupData[{
Cell[1256, 39, 123, 1, 29, "CategorizationSection",ExpressionUUID->"fd728fc9-f091-4156-99b2-64702a63a044",
 CellID->1122911449],
Cell[1382, 42, 134, 2, 70, "Categorization",ExpressionUUID->"abbb9169-930f-4172-a524-a4a0a530705b",
 CellID->686433507],
Cell[1519, 46, 133, 2, 70, "Categorization",ExpressionUUID->"8030a66e-e1d7-4022-b2ff-fc48aa3b64db",
 CellID->605800465],
Cell[1655, 50, 130, 2, 70, "Categorization",ExpressionUUID->"ceaec733-9e87-4175-bd8b-d074370f8e62",
 CellID->468444828],
Cell[1788, 54, 129, 1, 70, "Categorization",ExpressionUUID->"86ee919c-855f-4fd9-bcf8-74544f84d9d8"]
}, Closed]],
Cell[CellGroupData[{
Cell[1954, 60, 110, 1, 19, "KeywordsSection",ExpressionUUID->"a1fb591c-35a4-426e-a532-0e84497c33b1",
 CellID->477174294],
Cell[2067, 63, 100, 1, 70, "Keywords",ExpressionUUID->"0f3151f2-a392-4f64-b88e-ae95e51cb742",
 CellID->1164421360]
}, Closed]],
Cell[CellGroupData[{
Cell[2204, 69, 120, 1, 19, "TemplatesSection",ExpressionUUID->"7f7203ec-78a1-4c52-84d5-8bd22719486d",
 CellID->1872225408],
Cell[2327, 72, 149, 2, 70, "Template",ExpressionUUID->"ac2aea92-30e0-405a-93a6-20b299c18f8c",
 CellID->1562036412],
Cell[2479, 76, 137, 2, 70, "Template",ExpressionUUID->"a601320d-1b63-4b2a-84cf-d6f98f4186f0",
 CellID->158391909],
Cell[2619, 80, 136, 2, 70, "Template",ExpressionUUID->"34727c7f-0f8a-4ca3-a38f-7cecad1edefa",
 CellID->1360575930],
Cell[2758, 84, 137, 2, 70, "Template",ExpressionUUID->"23b474d1-d0a5-4480-b0e3-85b8d88c25a7",
 CellID->793782254]
}, Closed]],
Cell[CellGroupData[{
Cell[2932, 91, 108, 1, 19, "DetailsSection",ExpressionUUID->"968b81dd-427f-491e-a037-ace9c30c3e7c",
 CellID->307771771],
Cell[3043, 94, 118, 2, 70, "Details",ExpressionUUID->"516b0fb7-3913-4ec5-821e-e1768959b4f8",
 CellID->670882175],
Cell[3164, 98, 124, 2, 70, "Details",ExpressionUUID->"008bbf00-9d2f-46d6-b2a6-be2e64de1f2a",
 CellID->350963985],
Cell[3291, 102, 119, 2, 70, "Details",ExpressionUUID->"be3881dc-9e57-4362-8337-8ab9f982055f",
 CellID->8391405],
Cell[3413, 106, 124, 2, 70, "Details",ExpressionUUID->"0b21da73-07f7-463d-9ae1-500fac6680cb",
 CellID->3610269],
Cell[3540, 110, 116, 2, 70, "Details",ExpressionUUID->"d787bb51-f935-4f00-aeb7-d85073288522",
 CellID->401364205],
Cell[3659, 114, 116, 2, 70, "Details",ExpressionUUID->"85e09dd5-bbc2-4b3d-b3d3-be1198ccd303",
 CellID->350204745],
Cell[3778, 118, 118, 2, 70, "Details",ExpressionUUID->"3adb3215-e910-4794-b804-705882790156",
 CellID->732958810],
Cell[3899, 122, 133, 2, 70, "Details",ExpressionUUID->"88da69ff-5bc2-4de7-b645-8da5e33b4d19",
 CellID->222905350],
Cell[4035, 126, 122, 2, 70, "Details",ExpressionUUID->"ce2d322b-a94f-4666-bd20-0ecad432d593",
 CellID->240026365]
}, Closed]],
Cell[CellGroupData[{
Cell[4194, 133, 117, 1, 63, "ObjectName",ExpressionUUID->"62e86a78-9d73-4bb8-be68-117cf45aacc8",
 CellID->1224892054],
Cell[4314, 136, 2586, 65, 131, "Usage",ExpressionUUID->"d6c4f558-10c1-483b-a0f6-0fa23d6d2f78",
 CellID->982511436],
Cell[6903, 203, 552, 14, 27, "Notes",ExpressionUUID->"14854678-92b4-4d21-9a15-a699cffc4083",
 CellID->1067943069],
Cell[7458, 219, 1413, 29, 59, "Notes",ExpressionUUID->"5d86b751-ff68-4742-827a-49a78df5ad53",
 CellID->422530408],
Cell[8874, 250, 448, 10, 27, "Notes",ExpressionUUID->"ace29f84-37ba-42f5-be15-e5124b5c4eae",
 CellID->1485514993],
Cell[9325, 262, 1832, 33, 97, "3ColumnTableMod",ExpressionUUID->"70503679-2dfc-4245-aaa1-d1dac5b34738",
 CellID->1407269227],
Cell[11160, 297, 426, 10, 25, "Notes",ExpressionUUID->"e6700edd-247d-4e54-928c-2736b0057e1d",
 CellID->956015342],
Cell[11589, 309, 1922, 35, 93, "3ColumnTableMod",ExpressionUUID->"9cb39cbb-900d-41e3-b28c-c48dfcd1f821",
 CellID->1399050214],
Cell[13514, 346, 1100, 26, 59, "Notes",ExpressionUUID->"a6828fb1-bd39-42d8-acfc-933d486550da",
 CellID->742680128],
Cell[14617, 374, 865, 18, 58, "Notes",ExpressionUUID->"40090990-8d26-4f16-8f97-e3192b95eb29",
 CellID->747782077],
Cell[15485, 394, 823, 19, 60, "Notes",ExpressionUUID->"ac84a945-d0e5-4fa6-b6cd-89031ec253b8",
 CellID->445986520]
}, Open  ]],
Cell[CellGroupData[{
Cell[16345, 418, 112, 1, 44, "TutorialsSection",ExpressionUUID->"31060fa4-e9ec-43ca-8896-58b9fe41d034",
 CellID->250839057],
Cell[16460, 421, 285, 4, 16, "Tutorials",ExpressionUUID->"e39d1d06-0a08-496f-a142-65e9ba4c28b4",
 CellID->360339746],
Cell[16748, 427, 100, 1, 16, "Tutorials",ExpressionUUID->"65290a0c-807e-4335-a22d-04eea17d576b",
 CellID->341631938]
}, Open  ]],
Cell[CellGroupData[{
Cell[16885, 433, 138, 1, 31, "RelatedDemonstrationsSection",ExpressionUUID->"65345e67-45ca-4f04-af31-a278dcb07e0f",
 CellID->1268215905],
Cell[17026, 436, 113, 1, 16, "RelatedDemonstrations",ExpressionUUID->"d378d60a-70f5-46f7-9d34-1cbb7d864c7d",
 CellID->1129518860]
}, Open  ]],
Cell[CellGroupData[{
Cell[17176, 442, 120, 1, 31, "RelatedLinksSection",ExpressionUUID->"73a2ee0e-4b84-47a7-9b64-dc9e47b60037",
 CellID->1584193535],
Cell[17299, 445, 104, 1, 16, "RelatedLinks",ExpressionUUID->"6954a36d-3b79-4457-a616-2958f20de2cf",
 CellID->1038487239]
}, Open  ]],
Cell[CellGroupData[{
Cell[17440, 451, 110, 1, 31, "SeeAlsoSection",ExpressionUUID->"43e7ec72-3601-484a-bca8-b850ee209157",
 CellID->1255426704],
Cell[17553, 454, 2145, 53, 41, "SeeAlso",ExpressionUUID->"c6eb2bad-3411-4f34-bc60-dd081d2dc70c",
 CellID->929782353]
}, Open  ]],
Cell[CellGroupData[{
Cell[19735, 512, 112, 1, 31, "MoreAboutSection",ExpressionUUID->"1fbc7a9a-33aa-4e24-8d40-d94255cc498f",
 CellID->38303248],
Cell[19850, 515, 101, 1, 16, "MoreAbout",ExpressionUUID->"97afaf04-4753-4505-afd0-de289206f8d4",
 CellID->1665078683]
}, Open  ]],
Cell[CellGroupData[{
Cell[19988, 521, 411, 11, 70, "PrimaryExamplesSection",ExpressionUUID->"77b53bab-e8c2-4ebc-a274-a496697b3ed1",
 CellID->880084151],
Cell[CellGroupData[{
Cell[20424, 536, 1573, 39, 107, "Input",ExpressionUUID->"ae193080-f3f7-44d2-849c-796e4ab8f293",
 CellID->1676600577],
Cell[22000, 577, 5586, 134, 370, "Output",ExpressionUUID->"0523326d-7c9d-45e4-afe0-ddf06ebf0d07",
 CellID->1198449896]
}, Open  ]],
Cell[CellGroupData[{
Cell[27623, 716, 449, 11, 45, "Input",ExpressionUUID->"ae571093-483a-4060-9d15-115d370cae54",
 CellID->91496923],
Cell[28075, 729, 4188, 82, 190, "Output",ExpressionUUID->"90c20289-f9ba-4312-bebe-128ee7436e83",
 CellID->1439710254]
}, Open  ]],
Cell[CellGroupData[{
Cell[32300, 816, 611, 13, 69, "Input",ExpressionUUID->"47a012cf-5c12-4d17-95d4-10e3b5d84c8d",
 CellID->678446058],
Cell[32914, 831, 6274, 146, 370, "Output",ExpressionUUID->"3934e05d-b73a-426c-8a79-9d547a1070ee",
 CellID->1113246531]
}, Open  ]]
}, Open  ]],
Cell[CellGroupData[{
Cell[39237, 983, 155, 2, 56, "ExtendedExamplesSection",ExpressionUUID->"42d70f0f-37a0-4b44-a088-1361891c78c7",
 CellTags->"ExtendedExamples",
 CellID->1854448968],
Cell[39395, 987, 242, 5, 33, "ExampleSection",ExpressionUUID->"43ad91d5-4a35-4140-873e-71ba6f836772",
 CellID->1293636265],
Cell[39640, 994, 265, 5, 21, "ExampleSection",ExpressionUUID->"4565013f-7dc3-4c3d-995b-56a8e2deaa34",
 CellID->1020263627],
Cell[CellGroupData[{
Cell[39930, 1003, 244, 5, 21, "ExampleSection",ExpressionUUID->"65ded90e-3431-4fb5-91c4-1d6fcc9448e1",
 CellID->2061341341],
Cell[CellGroupData[{
Cell[40199, 1012, 329, 6, 24, "ExampleSubsection",ExpressionUUID->"833ad378-596d-485e-b3fb-06188d6adb45",
 CellID->541763087],
Cell[40531, 1020, 303, 6, 22, "ExampleText",ExpressionUUID->"1ee87541-a91e-410c-becb-2571eb6fafe4",
 CellID->1308282002],
Cell[CellGroupData[{
Cell[40859, 1030, 706, 18, 86, "Input",ExpressionUUID->"bf521d8e-121f-4e65-8098-c43629d6e923",
 CellID->210545981],
Cell[41568, 1050, 4989, 142, 192, "Output",ExpressionUUID->"e03a42f4-bf79-45ab-809f-80122e5de075",
 CellID->1504095499]
}, Open  ]],
Cell[CellGroupData[{
Cell[46594, 1197, 914, 23, 90, "Input",ExpressionUUID->"cb81cd19-6659-4c70-9f2e-390e60502900",
 CellID->684924312],
Cell[47511, 1222, 6519, 173, 192, "Output",ExpressionUUID->"6b14c0d4-47b0-45fc-a4aa-d239eb659325",
 CellID->287750519]
}, Open  ]],
Cell[54045, 1398, 386, 10, 25, "ExampleText",ExpressionUUID->"a82ca3e3-8088-4c7f-8ead-f06464e36981",
 CellID->1005212952],
Cell[54434, 1410, 453, 11, 48, "Input",ExpressionUUID->"b9d6239d-053a-47fb-8302-dfefc07586ac",
 CellID->360233315]
}, Open  ]],
Cell[CellGroupData[{
Cell[54924, 1426, 382, 7, 24, "ExampleSubsection",ExpressionUUID->"8c05d0d0-0ac8-43c0-952c-34bc850a021e",
 CellID->1757724783],
Cell[55309, 1435, 302, 6, 22, "ExampleText",ExpressionUUID->"d3a585cd-d821-4748-ba54-24c6bfda155b",
 CellID->268543758],
Cell[CellGroupData[{
Cell[55636, 1445, 707, 18, 86, "Input",ExpressionUUID->"b8e04f33-9f03-4405-94c8-1189dd4f318c",
 CellID->1212570482],
Cell[56346, 1465, 5114, 144, 192, "Output",ExpressionUUID->"a04922ac-70f7-4ee8-91d0-b61f69584405",
 CellID->1309206604]
}, Open  ]],
Cell[61475, 1612, 759, 17, 41, "ExampleText",ExpressionUUID->"187e6a83-6768-4ebb-acfe-1466c472510e",
 CellID->1943084892],
Cell[CellGroupData[{
Cell[62259, 1633, 877, 17, 47, "Input",ExpressionUUID->"d7f6bf55-73d6-4edb-991e-a105b4a450c3",
 CellID->697724628],
Cell[63139, 1652, 3319, 89, 370, "Output",ExpressionUUID->"47874513-8132-48de-8e50-bb7fd85743e7",
 CellID->1793761473]
}, Open  ]],
Cell[66473, 1744, 704, 15, 38, "ExampleText",ExpressionUUID->"4d5ae0c7-8da5-4319-a302-c730895f313e",
 CellID->63445816],
Cell[CellGroupData[{
Cell[67202, 1763, 314, 7, 27, "Input",ExpressionUUID->"0556cec1-3824-4fda-980a-a338d1250418",
 CellID->1512743877],
Cell[67519, 1772, 370, 7, 26, "Output",ExpressionUUID->"b40a44c8-48c3-4f03-b738-6676d5187783",
 CellID->1604604924]
}, Open  ]],
Cell[67904, 1782, 386, 10, 26, "ExampleText",ExpressionUUID->"dbb66838-b4ae-49c4-baeb-e974b4ea452b",
 CellID->1686906185],
Cell[68293, 1794, 454, 11, 47, "Input",ExpressionUUID->"45752cf4-0afa-40fb-b1c4-5e5bde94a6d6",
 CellID->1428394713]
}, Open  ]],
Cell[CellGroupData[{
Cell[68784, 1810, 323, 6, 24, "ExampleSubsection",ExpressionUUID->"37ddbdfa-1a53-4271-95b4-9a95453c1488",
 CellID->947367356],
Cell[69110, 1818, 302, 6, 22, "ExampleText",ExpressionUUID->"c901fa1f-fd95-4aff-a58e-e0d94044e3be",
 CellID->573456169],
Cell[CellGroupData[{
Cell[69437, 1828, 706, 18, 66, "Input",ExpressionUUID->"122ec9f8-6dbb-4650-bb1b-c537bf75a96b",
 CellID->171224647],
Cell[70146, 1848, 4942, 141, 192, "Output",ExpressionUUID->"3442cd26-9e25-4b57-8a22-ae8fa0ad0d04",
 CellID->1208629608]
}, Open  ]],
Cell[75103, 1992, 319, 5, 37, "ExampleText",ExpressionUUID->"06353d10-ae55-4cde-be0a-725d8e57491e",
 CellID->1280749984],
Cell[CellGroupData[{
Cell[75447, 2001, 1173, 27, 125, "Input",ExpressionUUID->"cc422371-e415-47c0-93a0-f1100ba3a41c",
 CellID->2002752601],
Cell[76623, 2030, 2803, 48, 190, "Output",ExpressionUUID->"b0fb644d-e602-476b-8316-d1df617908ca",
 CellID->788763676]
}, Open  ]],
Cell[79441, 2081, 783, 16, 54, "ExampleText",ExpressionUUID->"3a2e684c-a28f-4038-9cc1-559419bc9db6",
 CellID->675834675],
Cell[CellGroupData[{
Cell[80249, 2101, 1760, 37, 145, "Input",ExpressionUUID->"c9db8fb2-c7d3-4bca-a679-a22ae30581f8",
 CellID->631003679],
Cell[82012, 2140, 3618, 91, 370, "Output",ExpressionUUID->"e6d396c1-d002-482b-a041-6a46571c2bb3",
 CellID->1159037291]
}, Open  ]],
Cell[85645, 2234, 386, 10, 25, "ExampleText",ExpressionUUID->"3a828774-145b-432d-b187-caa9aac7f659",
 CellID->2008103444],
Cell[86034, 2246, 453, 11, 48, "Input",ExpressionUUID->"df053f67-7794-4788-9911-c89fe6b8da90",
 CellID->341587056]
}, Open  ]],
Cell[86502, 2260, 247, 5, 24, "ExampleSubsection",ExpressionUUID->"e9932f02-34ba-4fc4-b0a8-7572d0b822a7",
 CellID->1295379749]
}, Open  ]],
Cell[86764, 2268, 248, 5, 33, "ExampleSection",ExpressionUUID->"34ede0ce-2c62-4ab9-8e0b-d2a08e869bd1",
 CellID->258228157],
Cell[87015, 2275, 259, 5, 21, "ExampleSection",ExpressionUUID->"fed10896-5838-4b0d-b718-c8809c1b6256",
 CellID->2123667759],
Cell[87277, 2282, 252, 5, 21, "ExampleSection",ExpressionUUID->"37af1b90-0e05-48de-b265-961bcbf8fd0e",
 CellID->1305812373],
Cell[87532, 2289, 257, 5, 21, "ExampleSection",ExpressionUUID->"6b511560-ed89-4e8a-af4b-b24f31aba3c8",
 CellID->1653164318],
Cell[87792, 2296, 249, 5, 21, "ExampleSection",ExpressionUUID->"0777c10a-a047-4284-a5d1-bc855e0b8e9f",
 CellID->589267740],
Cell[CellGroupData[{
Cell[88066, 2305, 374, 8, 21, "ExampleSection",ExpressionUUID->"e2d20453-56a3-4e14-96c3-d52e1313097f",
 CellID->1903379581],
Cell[88443, 2315, 5338, 104, 530, "Input",ExpressionUUID->"2959d949-cba1-408c-aa9a-1cdc531b6aff",
 InitializationCell->False,
 CellID->721711247],
Cell[93784, 2421, 28778, 496, 1205, "Input",ExpressionUUID->"baf8bb79-f460-4e59-ac81-a889605b0a5a",
 InitializationCell->False,
 CellID->813290073],
Cell[122565, 2919, 33622, 591, 1718, "Input",ExpressionUUID->"2a924cb3-91b6-43e0-b561-139fd3e020b4",
 InitializationCell->False,
 CellID->232843756]
}, Closed]]
}, Open  ]]
}
]
*)

